Skip to content

Commit

Permalink
Fix checkstyle test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
HindujaB committed Oct 4, 2024
1 parent 8804c11 commit 08e776c
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -520,24 +520,28 @@ public void workerVariableVisibilityTest() throws BallerinaTestException {
Pair<BallerinaTestDebugPoint, StoppedEventArguments> debugHitInfo = debugTestRunner.waitForDebugHit(25000);
if (debugHitInfo.getKey().getLine() == 23) {
// variable visibility test inside worker (only worker's variables should be visible)
localVariables = debugTestRunner.fetchVariables(debugHitInfo.getRight(), DebugTestRunner.VariableScope.LOCAL);
localVariables = debugTestRunner.fetchVariables(debugHitInfo.getRight(),
DebugTestRunner.VariableScope.LOCAL);
debugTestRunner.assertVariable(localVariables, "x", "10", "int");
// variables outside worker should not be visible
Assert.assertFalse(localVariables.containsKey("a"));
// variable visibility test for workers outside fork (workers are visible outside fork() as futures).
debugTestRunner.resumeProgram(debugHitInfo.getRight(), DebugTestRunner.DebugResumeKind.NEXT_BREAKPOINT);
debugHitInfo = debugTestRunner.waitForDebugHit(10000);
localVariables = debugTestRunner.fetchVariables(debugHitInfo.getRight(), DebugTestRunner.VariableScope.LOCAL);
localVariables = debugTestRunner.fetchVariables(debugHitInfo.getRight(),
DebugTestRunner.VariableScope.LOCAL);
debugTestRunner.assertVariable(localVariables, "w1", "future<()>", "future");
Assert.assertTrue(localVariables.containsKey("a"));
} else {
// variable visibility test for workers outside fork (workers are visible outside fork() as futures).
localVariables = debugTestRunner.fetchVariables(debugHitInfo.getRight(), DebugTestRunner.VariableScope.LOCAL);
localVariables = debugTestRunner.fetchVariables(debugHitInfo.getRight(),
DebugTestRunner.VariableScope.LOCAL);
debugTestRunner.assertVariable(localVariables, "w1", "future<()>", "future");
Assert.assertTrue(localVariables.containsKey("a"));
debugTestRunner.resumeProgram(debugHitInfo.getRight(), DebugTestRunner.DebugResumeKind.NEXT_BREAKPOINT);
debugHitInfo = debugTestRunner.waitForDebugHit(10000);
localVariables = debugTestRunner.fetchVariables(debugHitInfo.getRight(), DebugTestRunner.VariableScope.LOCAL);
localVariables = debugTestRunner.fetchVariables(debugHitInfo.getRight(),
DebugTestRunner.VariableScope.LOCAL);
debugTestRunner.assertVariable(localVariables, "x", "10", "int");
// variables outside worker should not be visible
Assert.assertFalse(localVariables.containsKey("a"));
Expand Down

0 comments on commit 08e776c

Please sign in to comment.