Skip to content

Commit

Permalink
fix: clear log before test (#746)
Browse files Browse the repository at this point in the history
* fix: logging for APIKeyUnauthorisedException

* fix: pr comments

* fix: clear log before run
  • Loading branch information
sattvikc authored Jul 11, 2023
1 parent 1cd376c commit 9e931e2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/test/java/io/supertokens/test/CLIOptionsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;

import static org.junit.Assert.*;

Expand Down Expand Up @@ -151,6 +152,18 @@ public void testMultipleInstancesAtTheSameTime() throws Exception {
assertEquals(Config.getConfig(process1.getProcess()).getErrorLogPath(process1.getProcess()),
Config.getConfig(process2.getProcess()).getErrorLogPath(process2.getProcess()));

// clear log files
{
FileWriter f = new FileWriter(Config.getConfig(process.getProcess()).getInfoLogPath(process.getProcess()));
f.flush();
f.close();
}
{
FileWriter f = new FileWriter(Config.getConfig(process.getProcess()).getErrorLogPath(process.getProcess()));
f.flush();
f.close();
}

Logging.debug(process.getProcess(), TenantIdentifier.BASE_TENANT, "debugunique1");
Logging.debug(process1.getProcess(), TenantIdentifier.BASE_TENANT, "debugunique2");
Logging.debug(process2.getProcess(), TenantIdentifier.BASE_TENANT, "debugunique3");
Expand Down

0 comments on commit 9e931e2

Please sign in to comment.