Skip to content

Commit

Permalink
Add print statements to debug tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ravinperera00 committed Sep 16, 2024
1 parent 114936a commit fe41521
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public void testBasicLogFunctionality() throws BallerinaTestException {
String output = bMainInstance.runMainAndReadStdOut("run", new String[]{"mainmod"}, new HashMap<>(),
projectDirPath, true);
String[] logLines = output.split("\n");
printLogLines(logLines);
assertEquals(logLines.length, 13);

validateLogLevel(logLines[9], "INFO", "[logorg/foo]", "Logging from inside `foo` module");
Expand Down Expand Up @@ -140,6 +141,7 @@ public void testDebugLevel() throws BallerinaTestException {
String output = bMainInstance.runMainAndReadStdOut("run", args, new HashMap<>(), testFileLocation, true);
String[] logLines = output.split("\n");

printLogLines(logLines);
assertEquals(logLines.length, 9);

console.println(logLines[4]);
Expand All @@ -165,6 +167,7 @@ public void testTraceLevel() throws BallerinaTestException {
String output = bMainInstance.runMainAndReadStdOut("run", args, new HashMap<>(), testFileLocation, true);
String[] logLines = output.split("\n");

printLogLines(logLines);
assertEquals(logLines.length, 10);

console.println(logLines[4]);
Expand Down

0 comments on commit fe41521

Please sign in to comment.