diff --git a/tests/unit/src/test/scala/tests/BillLspSuite.scala b/tests/unit/src/test/scala/tests/BillLspSuite.scala index f3743ddbea1..73d6611f099 100644 --- a/tests/unit/src/test/scala/tests/BillLspSuite.scala +++ b/tests/unit/src/test/scala/tests/BillLspSuite.scala @@ -251,6 +251,8 @@ class BillLspSuite extends BaseLspSuite("bill") { server.executeCommand(ServerCommands.CancelCompile) } _ = assertEquals(compileReport.getStatusCode(), StatusCode.CANCELLED) + // wait for all the side effect (`onComplete`) actions of cancellation to happen + _ = Thread.sleep(1000) currentTrace = trace cancelMatch = cancelPattern.findFirstMatchIn(currentTrace) _ = assert(cancelMatch.nonEmpty, trace)