Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to R# 2024.2 #339

Merged
merged 4 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ILRepack" Version="2.0.30" PrivateAssets="All" />
<PackageReference Include="JetBrains.ReSharper.TestRunner.Abstractions" Version="[2.14.1,)" PrivateAssets="All" />
<PackageReference Include="ILRepack" Version="2.0.34" PrivateAssets="All" />
<PackageReference Include="JetBrains.ReSharper.TestRunner.Abstractions" Version="[2.16.1,)" PrivateAssets="All" />
<PackageReference Include="Machine.Specifications.Runner.Utility" Version="1.0.2" PrivateAssets="All" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="JetBrains.ReSharper.TestRunner.Abstractions" Version="[2.14.1,)" PrivateAssets="All" />
<PackageReference Include="JetBrains.ReSharper.TestRunner.Abstractions" Version="[2.16.1,)" PrivateAssets="All" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@

<ItemGroup>
<PackageReference Include="JetBrains.Lifetimes" Version="[2024.1.0,)" />
<PackageReference Include="JetBrains.ReSharper.SDK.Tests" Version="2024.1.0">
<PackageReference Include="JetBrains.ReSharper.SDK.Tests" Version="2024.2.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="JetBrains.ReSharper.TestRunner.Abstractions" Version="[2.14.1,)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="JetBrains.ReSharper.TestRunner.Abstractions" Version="[2.16.1,)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="NUnit" Version="[3.13.2,)" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
using System;
using JetBrains.Util;
using JetBrains.Util.Processes;

namespace Machine.Specifications.Runner.ReSharper.Tests.TestFramework.Execution;

public class EmptyPreparedProcess : IPreparedProcess
public class EmptyPreparedProcess : IPreparedProcessWithCachedOutput
{
public int ProcessId => 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
using JetBrains.ReSharper.TestRunner.Abstractions.Objects;
using JetBrains.ReSharper.UnitTestFramework;
using JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner;
using JetBrains.Util;
using JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.Activation;
using JetBrains.Util.Processes;

namespace Machine.Specifications.Runner.ReSharper.Tests.TestFramework.Execution;

Expand All @@ -27,14 +28,18 @@ public Task<int> Shutdown()

public Lifetime Lifetime { get; } = Lifetime.Eternal;

public IPreparedProcess Process { get; } = new EmptyPreparedProcess();
public IPreparedProcessWithCachedOutput Process { get; } = new EmptyPreparedProcess();

public IMessageBroker MessageBroker { get; }

public object ActivationOptions { get; } = new();

public ITestRunnerExecutionContext Context { get; }

public IRemoteAgentSerializers Serializers { get; }

public ITestRunnerMessageHandlerRegistry MessageHandlers { get; }

public async Task RunTests(CancellationToken cancelCt, CancellationToken abortCt)
{
cancelCt.Register(() => MessageBroker.Abort());
Expand Down Expand Up @@ -66,4 +71,8 @@ private void ReportUnitTestElements(ITestRunnerRemoteTaskDepot depot)
}
}
}

public void Dispose()
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using JetBrains.Application.UI.ActionSystem.ActionBar;
using JetBrains.Application.UI.Components;
using JetBrains.Application.UI.Components.Theming;
using JetBrains.Application.UI.ToolWindowManagement;
using JetBrains.Lifetimes;
using JetBrains.ProjectModel;
using JetBrains.ReSharper.Psi.Caches;
Expand All @@ -23,6 +22,7 @@
using JetBrains.ReSharper.UnitTestFramework.UI.ViewModels.TreeModel.Nodes;
using System.Collections.Generic;
using JetBrains.Application.Components;
using System.Threading.Tasks;

namespace Machine.Specifications.Runner.ReSharper.Tests.TestFramework;

Expand All @@ -41,16 +41,15 @@ public UnitTestSessionConductor(
IActionManager actionManager,
IActionBarManager actionBarManager,
IPersistentIndexManager persistentIndexManager,
ToolWindowManager toolWindowManager,
IUnitTestSessionRepository sessionRepository,
IEnumerable<IUnitTestSessionManagerPreviewPanelFactory> previewPanelFactories,
ILogger logger)
: base(serializer, lifetime, solution, theming, application, settings, actionManager, actionBarManager, persistentIndexManager, toolWindowManager, sessionRepository, logger)
: base(serializer, lifetime, solution, theming, application, settings, actionManager, actionBarManager, persistentIndexManager, sessionRepository, logger)
{
this.previewPanelFactories = previewPanelFactories;
}

public override IUnitTestSessionTreeViewModel OpenSession(IUnitTestSession session, bool activate = true)
public override Task<IUnitTestSessionTreeViewModel> OpenSession(IUnitTestSession session, bool activate = true)
{
EnsureSessionsAreOpened();

Expand All @@ -61,11 +60,12 @@ public override IUnitTestSessionTreeViewModel OpenSession(IUnitTestSession sessi
ActiveSession.Value = viewModel;
}

return viewModel;
return Task.FromResult(viewModel);
}

public override void CloseSession(IUnitTestSession session)
public override Task CloseSession(IUnitTestSession session)
{
return Task.CompletedTask;
}

private IUnitTestSessionTreeViewModel CreateViewModel(IUnitTestSession session)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ protected override void DoTest(Lifetime lifetime, IProject project)

var observer = new TestElementObserverOnFile(transaction.Observer, file!.GetSourceFile());

fileExplorer.ProcessFile(file, observer, InterruptableReadActivity.Empty);
fileExplorer.ProcessFile(file, observer, () => false);

DumpElements(transaction.Elements, projectFile.Name + ".source");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<Authors>Machine</Authors>
<Owners>Machine</Owners>
<PackageTags>test;unit;testing;context;specification;bdd;tdd;mspec;runner;resharper</PackageTags>
<PackageReleaseNotes>Adds support for R# and Rider 2024.1</PackageReleaseNotes>
<PackageReleaseNotes>Adds support for R# and Rider 2024.2</PackageReleaseNotes>
<PackageIcon>Machine.png</PackageIcon>
<PackageIconUrl>http://github.com/machine/machine.specifications.runner.resharper/raw/master/images/icon.png</PackageIconUrl>
<RepositoryUrl>https://github.com/machine/machine.specifications.runner.resharper</RepositoryUrl>
Expand All @@ -28,13 +28,13 @@
</PropertyGroup>

<PropertyGroup>
<SdkVersion>2024.1.0</SdkVersion>
<SdkVersion>2024.2.0</SdkVersion>
<WaveVersionBase>$(SdkVersion.Substring(2,2))$(SdkVersion.Substring(5,1))</WaveVersionBase>
<WaveVersion>$(WaveVersionBase).0.0</WaveVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="JetBrains.ReSharper.SDK" Version="2024.1.0" PrivateAssets="All" />
<PackageReference Include="JetBrains.ReSharper.SDK" Version="2024.2.3" PrivateAssets="All" />
<PackageReference Include="Machine.Specifications.Runner.Utility" Version="1.0.2" PrivateAssets="All" />
<PackageReference Include="Wave" Version="[$(WaveVersion)]" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class MspecTestRunnerOrchestrator : ITestRunnerAdapter

public TestAdapterLoader GetTestAdapterLoader(ITestRunnerContext context)
{
var framework = context.RuntimeEnvironment.TargetFrameworkId.IsNetCoreSdk()
var framework = context.RuntimeDescriptor.TargetFrameworkId.IsNetCoreSdk()
? "netstandard20"
: "net461";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using JetBrains.ProjectModel;
using JetBrains.ProjectModel.DotNetCore;
using JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner;
using JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.DataCollection;
using JetBrains.ReSharper.UnitTestFramework.Exploration.Artifacts;
Expand All @@ -12,11 +11,9 @@ public class MspecTestRunnerRunStrategy : TestRunnerRunStrategy
public MspecTestRunnerRunStrategy(
IDataCollectorFactory dataCollectorFactory,
IAgentManagerHost agentManagerHost,
ITestRunnerHostSource testRunnerHostSource,
MspecTestRunnerOrchestrator adapter,
IUnitTestProjectArtifactResolver artifactResolver,
DotNetCoreLaunchSettingsJsonProfileProvider launchSettingsProvider)
: base(dataCollectorFactory, agentManagerHost.AgentManager, testRunnerHostSource, adapter, artifactResolver, launchSettingsProvider)
IUnitTestProjectArtifactResolver artifactResolver)
: base(dataCollectorFactory, agentManagerHost.AgentManager, adapter, artifactResolver)
{
}
}
Loading