Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeting Yang <ketyang@microsoft.com>2019-09-19 21:10:43 +0300
committerKeting Yang <ketyang@microsoft.com>2019-09-19 21:10:43 +0300
commitf33c9d08d6a07fa04f318222dbd6a7372643e365 (patch)
treef1857c1c1750a70e9328e0aec22ee82a6ba4c831 /main/src/addins/MonoDevelop.UnitTesting
parent5cd9b793431fef15859a8006d9f661a73235db92 (diff)
Move method calls to avoid duplicate calls to DiscoverTestAsync()
Diffstat (limited to 'main/src/addins/MonoDevelop.UnitTesting')
-rw-r--r--main/src/addins/MonoDevelop.UnitTesting/MonoDevelop.UnitTesting.VsTest/VsTestProjectTestSuite.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/main/src/addins/MonoDevelop.UnitTesting/MonoDevelop.UnitTesting.VsTest/VsTestProjectTestSuite.cs b/main/src/addins/MonoDevelop.UnitTesting/MonoDevelop.UnitTesting.VsTest/VsTestProjectTestSuite.cs
index 5ecb19d6dc..12810f8e78 100644
--- a/main/src/addins/MonoDevelop.UnitTesting/MonoDevelop.UnitTesting.VsTest/VsTestProjectTestSuite.cs
+++ b/main/src/addins/MonoDevelop.UnitTesting/MonoDevelop.UnitTesting.VsTest/VsTestProjectTestSuite.cs
@@ -98,7 +98,6 @@ namespace MonoDevelop.UnitTesting.VsTest
protected async Task DiscoverTestsAsync ()
{
try {
- AddOldTests ();
Status = TestStatus.Loading;
var discoveredTests = await VsTestDiscoveryAdapter.Instance.DiscoverTestsAsync (Project);
@@ -127,7 +126,7 @@ namespace MonoDevelop.UnitTesting.VsTest
void AddOldTests ()
{
- if (oldTests != null && Tests.Count == 0) {
+ if (oldTests != null) {
foreach (var test in oldTests) {
Tests.Add (test);
}
@@ -165,8 +164,10 @@ namespace MonoDevelop.UnitTesting.VsTest
public async override Task Refresh (CancellationToken ct)
{
- if (testDiscoveryTask == null)
+ AddOldTests ();
+ if (testDiscoveryTask == null) {
testDiscoveryTask = DiscoverTestsAsync ();
+ }
await testDiscoveryTask;
}