Skip to content

Commit 9e931e2

Browse files
authored
fix: clear log before test (#746)
* fix: logging for APIKeyUnauthorisedException * fix: pr comments * fix: clear log before run
1 parent 1cd376c commit 9e931e2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/test/java/io/supertokens/test/CLIOptionsTest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import java.io.BufferedReader;
3333
import java.io.File;
3434
import java.io.FileReader;
35+
import java.io.FileWriter;
3536

3637
import static org.junit.Assert.*;
3738

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

155+
// clear log files
156+
{
157+
FileWriter f = new FileWriter(Config.getConfig(process.getProcess()).getInfoLogPath(process.getProcess()));
158+
f.flush();
159+
f.close();
160+
}
161+
{
162+
FileWriter f = new FileWriter(Config.getConfig(process.getProcess()).getErrorLogPath(process.getProcess()));
163+
f.flush();
164+
f.close();
165+
}
166+
154167
Logging.debug(process.getProcess(), TenantIdentifier.BASE_TENANT, "debugunique1");
155168
Logging.debug(process1.getProcess(), TenantIdentifier.BASE_TENANT, "debugunique2");
156169
Logging.debug(process2.getProcess(), TenantIdentifier.BASE_TENANT, "debugunique3");

0 commit comments

Comments
 (0)