diff options
author | therzok <marius.ungureanu@xamarin.com> | 2019-12-01 16:13:03 +0300 |
---|---|---|
committer | monojenkins <jo.shields+jenkins@xamarin.com> | 2019-12-03 11:54:19 +0300 |
commit | bca444b28dafe7bdd044ec5f4230bfcbafd74300 (patch) | |
tree | e7162290dffc1d6f3a0ff66785f864287c47ed30 | |
parent | a8ac5340f0d282932cfb87d1b0a84aef4909f5a1 (diff) |
Initialize the composition manager in version control tests
Don't inherit test base, as that will slow down test runs
4 files changed, 19 insertions, 2 deletions
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/BaseRepositoryTests.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/BaseRepositoryTests.cs index 5a903781ba..fdfedc7e6b 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/BaseRepositoryTests.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/BaseRepositoryTests.cs @@ -53,11 +53,13 @@ namespace MonoDevelop.VersionControl.Tests protected int CommitNumber = 0; [SetUp] - public virtual Task Setup () + public virtual async Task Setup () { + // Load this on setup, otherwise we'll get into a deadlock. + await Runtime.GetService<Ide.Composition.CompositionManager> (); + var vcs = Repo.VersionControlSystem; Console.WriteLine ("Running {0} for {1} (v{2})", TestContext.CurrentContext.Test.FullName, vcs.Name, vcs.Version); - return Task.CompletedTask; } [TearDown] diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/MonoDevelop.VersionControl.Git.Tests.csproj b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/MonoDevelop.VersionControl.Git.Tests.csproj index 683ac2c4b6..cf4cbfacb3 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/MonoDevelop.VersionControl.Git.Tests.csproj +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/MonoDevelop.VersionControl.Git.Tests.csproj @@ -57,6 +57,11 @@ <Name>MonoDevelop.SourceEditor</Name> <Private>False</Private> </ProjectReference> + <ProjectReference Include="..\..\..\core\MonoDevelop.Ide\MonoDevelop.Ide.csproj"> + <Project>{27096E7F-C91C-4AC6-B289-6897A701DF21}</Project> + <Name>MonoDevelop.Ide</Name> + <Private>False</Private> + </ProjectReference> </ItemGroup> <ItemGroup> <IncludeCopyLocal Include="LibGit2Sharp.dll" /> diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/MonoDevelop.VersionControl.Subversion.Tests.csproj b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/MonoDevelop.VersionControl.Subversion.Tests.csproj index 9d1b8549ea..f5201c3311 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/MonoDevelop.VersionControl.Subversion.Tests.csproj +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/MonoDevelop.VersionControl.Subversion.Tests.csproj @@ -55,6 +55,11 @@ <Project>{D12F0F7B-8DE3-43EC-BA49-41052D065A9B}</Project> <Name>GuiUnit_NET_4_5</Name> </ProjectReference> + <ProjectReference Include="..\..\..\core\MonoDevelop.Ide\MonoDevelop.Ide.csproj"> + <Project>{27096E7F-C91C-4AC6-B289-6897A701DF21}</Project> + <Name>MonoDevelop.Ide</Name> + <Private>False</Private> + </ProjectReference> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> </Project>
\ No newline at end of file diff --git a/main/src/addins/VersionControl/Subversion.Win32.Tests/VersionControl.Subversion.Win32.Tests.csproj b/main/src/addins/VersionControl/Subversion.Win32.Tests/VersionControl.Subversion.Win32.Tests.csproj index e06c1dddd1..7f043547c5 100644 --- a/main/src/addins/VersionControl/Subversion.Win32.Tests/VersionControl.Subversion.Win32.Tests.csproj +++ b/main/src/addins/VersionControl/Subversion.Win32.Tests/VersionControl.Subversion.Win32.Tests.csproj @@ -51,6 +51,11 @@ <Name>GuiUnit_NET_4_5</Name> <Private>False</Private> </ProjectReference> + <ProjectReference Include="..\..\..\core\MonoDevelop.Ide\MonoDevelop.Ide.csproj"> + <Project>{27096E7F-C91C-4AC6-B289-6897A701DF21}</Project> + <Name>MonoDevelop.Ide</Name> + <Private>False</Private> + </ProjectReference> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> </Project> |