Skip to content

Commit c2ea4bd

Browse files
committed
Try fixing random Travis fails
1 parent c4d9339 commit c2ea4bd

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Core/Compiler/ProjectCompiler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public ICollection<string> CompileTestProjects(string projectPath)
4444
string assemblyName = project.GetPropertyValue("AssemblyName");
4545

4646
string assemblyPath = Path.Combine(projectRoot, ProjectCompiler.BIN_PATH, ProjectCompiler.OUTPUT_PATH, $"{assemblyName}.dll");
47-
Console.WriteLine(assemblyPath);
47+
4848
files.Add(assemblyPath);
4949
}
5050

Core/Test/ProjectTestRunner.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ public void RunAssemblyTests(Assembly assembly)
6565

6666
//OnExecutionComplete is invoked before setting the Status so spin here until it changes
6767
SpinWait.SpinUntil(() => runner.Status == AssemblyRunnerStatus.Idle);
68+
69+
//Give up the time slice
70+
//Travis sometimes fails inside the xUnit thread pool while trying to wait for completion
71+
//Try to fix this by trying to give the time slice to the thread pool thread
72+
Thread.Sleep(1);
6873
}
6974

7075
private void AddTestResult(MethodTestResult result)

0 commit comments

Comments
 (0)