Skip to content

Commit 6122e27

Browse files
author
Ravi Chande
authored
Merge pull request #1987 from rchande/hoverTest
Make hover test pass?
2 parents 99b4ab1 + c6d4ad3 commit 6122e27

21 files changed

+7522
-8
lines changed

src/omnisharp/server.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,11 +351,10 @@ export class OmniSharpServer {
351351
});
352352
}
353353

354-
public restart(launchTarget: LaunchTarget = this._launchTarget): Promise<void> {
354+
public async restart(launchTarget: LaunchTarget = this._launchTarget): Promise<void> {
355355
if (launchTarget) {
356-
return this.stop().then(() => {
357-
this._start(launchTarget);
358-
});
356+
await this.stop();
357+
await this._start(launchTarget);
359358
}
360359
}
361360

test/integrationTests/hoverProvider.integration.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,22 @@ suite(`Tasks generation: ${testAssetWorkspace.description}`, function() {
2121
suiteSetup(async function() {
2222
should();
2323

24+
await testAssetWorkspace.cleanupWorkspace();
25+
2426
let csharpExtension = vscode.extensions.getExtension("ms-vscode.csharp");
2527
if (!csharpExtension.isActive) {
2628
await csharpExtension.activate();
2729
}
2830

29-
await testAssetWorkspace.cleanupWorkspace();
30-
3131
await csharpExtension.exports.initializationFinished;
32-
32+
await omnisharp.restart();
33+
3334
await vscode.commands.executeCommand("dotnet.generateAssets");
3435

3536
await poll(async () => await fs.exists(testAssetWorkspace.launchJsonPath), 10000, 100);
3637

3738
});
3839

39-
4040
test("Hover returns structured documentation with proper newlines", async function () {
4141

4242
let program =

test/integrationTests/testAssets/singleCsproj/obj/Debug/netcoreapp2.0/singleCsproj.AssemblyInfo.cs

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
430bdcfd8bad4c9c4b8cb192efe5e61394e77ebc
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fe2f654e9c48e6a308b6a264aa38a2b3defe5730

test/integrationTests/testAssets/singleCsproj/obj/project.assets.json

Lines changed: 721 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"version": 1,
3+
"dgSpecHash": "F/2npLNJmV62pdE6xnL6onDE/ZUOXXwAbeOh12Em+cH/3uZOrmJZgsI0iJtb+26OOF3cRtdrW33x5W5+YX4DVw==",
4+
"success": true
5+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2+
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
4+
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
5+
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
6+
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">C:\omnisharp-vscode\test\integrationTests\testAssets\singleCsproj\obj\project.assets.json</ProjectAssetsFile>
7+
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
8+
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\rchande\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder</NuGetPackageFolders>
9+
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
10+
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">4.5.0</NuGetToolVersion>
11+
</PropertyGroup>
12+
<PropertyGroup>
13+
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
14+
</PropertyGroup>
15+
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
16+
<Import Project="$(NuGetPackageRoot)microsoft.netcore.app\2.0.0\build\netcoreapp2.0\Microsoft.NETCore.App.props" Condition="Exists('$(NuGetPackageRoot)microsoft.netcore.app\2.0.0\build\netcoreapp2.0\Microsoft.NETCore.App.props')" />
17+
</ImportGroup>
18+
</Project>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2+
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
5+
</PropertyGroup>
6+
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
7+
<Import Project="$(NuGetPackageRoot)netstandard.library\2.0.0\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('$(NuGetPackageRoot)netstandard.library\2.0.0\build\netstandard2.0\NETStandard.Library.targets')" />
8+
<Import Project="$(NuGetPackageRoot)microsoft.netcore.app\2.0.0\build\netcoreapp2.0\Microsoft.NETCore.App.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.netcore.app\2.0.0\build\netcoreapp2.0\Microsoft.NETCore.App.targets')" />
9+
</ImportGroup>
10+
</Project>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"version": 1,
3+
"dgSpecHash": "RNA104eAZOOjmBHjHUGqqHR8Fn7tcLprXcob3oYEPt6wIFL2EV8N4mAG22nU31T1NJV+oAzYBZ7kJEOWeYa4gA==",
4+
"success": true
5+
}

0 commit comments

Comments
 (0)