Skip to content

Commit e28d8f3

Browse files
author
Rishabh
committed
test fix
1 parent 7e1e25d commit e28d8f3

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

cli/jar/cli.jar

0 Bytes
Binary file not shown.

downloader/jar/downloader.jar

0 Bytes
Binary file not shown.

jar/core-3.6.0.jar

0 Bytes
Binary file not shown.

src/test/java/io/supertokens/test/LoggingTest.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import org.slf4j.LoggerFactory;
3333

3434
import java.io.*;
35+
import java.nio.charset.StandardCharsets;
3536
import java.util.Scanner;
3637

3738
import static org.junit.Assert.*;
@@ -64,7 +65,7 @@ public void defaultLogging() throws Exception {
6465
File infoLog = new File(Config.getConfig(process.getProcess()).getInfoLogPath(process.getProcess()));
6566
File errorLog = new File(Config.getConfig(process.getProcess()).getErrorLogPath(process.getProcess()));
6667

67-
try (Scanner scanner = new Scanner(infoLog)) {
68+
try (Scanner scanner = new Scanner(infoLog, StandardCharsets.UTF_8)) {
6869
while (scanner.hasNextLine()) {
6970
String line = scanner.nextLine();
7071
if (line.contains(process.getProcess().getProcessId())) {
@@ -74,7 +75,7 @@ public void defaultLogging() throws Exception {
7475
}
7576
}
7677

77-
try (Scanner errorScanner = new Scanner(errorLog)) {
78+
try (Scanner errorScanner = new Scanner(errorLog, StandardCharsets.UTF_8)) {
7879
while (errorScanner.hasNextLine()) {
7980
String line = errorScanner.nextLine();
8081
if (line.contains(process.getProcess().getProcessId())) {
@@ -112,7 +113,7 @@ public void customLogging() throws Exception {
112113
File infoLog = new File(Config.getConfig(process.getProcess()).getInfoLogPath(process.getProcess()));
113114
File errorLog = new File(Config.getConfig(process.getProcess()).getErrorLogPath(process.getProcess()));
114115

115-
try (Scanner scanner = new Scanner(infoLog)) {
116+
try (Scanner scanner = new Scanner(infoLog, StandardCharsets.UTF_8)) {
116117
while (scanner.hasNextLine()) {
117118
String line = scanner.nextLine();
118119
if (line.contains(process.getProcess().getProcessId())) {
@@ -122,7 +123,7 @@ public void customLogging() throws Exception {
122123
}
123124
}
124125

125-
try (Scanner errorScanner = new Scanner(errorLog)) {
126+
try (Scanner errorScanner = new Scanner(errorLog, StandardCharsets.UTF_8)) {
126127
while (errorScanner.hasNextLine()) {
127128
String line = errorScanner.nextLine();
128129
if (line.contains(process.getProcess().getProcessId())) {

0 commit comments

Comments
 (0)