Skip to content

Commit 3fcdc50

Browse files
committed
8266646: Add more diagnostic to java/lang/System/LoggerFinder/modules
Reviewed-by: naoto, iris, bpb, lancea
1 parent 9a19a0c commit 3fcdc50

File tree

4 files changed

+32
-11
lines changed

4 files changed

+32
-11
lines changed

test/jdk/java/lang/System/LoggerFinder/modules/boot_client/BootClient.java

+8-3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
import java.lang.reflect.Method;
2525
import java.lang.System.Logger;
26+
import java.time.Instant;
2627
import java.util.ResourceBundle;
2728
import java.util.ListResourceBundle;
2829

@@ -36,9 +37,13 @@ public static void main(String[] args) throws Exception {
3637
String loggerMode = args[0];
3738
String loggerClassName = args[1];
3839
String underlyingLoggerClassName = args.length >= 3 ? args[2] : null;
39-
40-
testLogger(loggerMode, loggerClassName, underlyingLoggerClassName);
41-
testLog(underlyingLoggerClassName);
40+
System.err.println("BootClient starting at " + Instant.now());
41+
try {
42+
testLogger(loggerMode, loggerClassName, underlyingLoggerClassName);
43+
testLog(underlyingLoggerClassName);
44+
} finally {
45+
System.err.println("BootClient finished at " + Instant.now());
46+
}
4247
}
4348

4449
/*

test/jdk/java/lang/System/LoggerFinder/modules/named_client/m.t.a/pkg/a/t/TestA.java

+8-3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
import java.lang.reflect.Method;
2727
import java.lang.System.Logger;
28+
import java.time.Instant;
2829
import java.util.ResourceBundle;
2930
import java.util.ListResourceBundle;
3031

@@ -37,9 +38,13 @@ public static void main(String[] args) throws Exception {
3738
assertTrue(args.length == 2);
3839
String loggerMode = args[0];
3940
String loggerClassName = args[1];
40-
41-
testLogger(loggerMode, loggerClassName);
42-
testLog(loggerClassName);
41+
System.err.println("TestA starting at " + Instant.now());
42+
try {
43+
testLogger(loggerMode, loggerClassName);
44+
testLog(loggerClassName);
45+
} finally {
46+
System.err.println("TestA finished at " + Instant.now());
47+
}
4348
}
4449

4550
/*

test/jdk/java/lang/System/LoggerFinder/modules/patched_client/PatchedClient.java

+8-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
import java.lang.reflect.Method;
2525
import java.lang.System.Logger;
26+
import java.time.Instant;
2627
import java.util.ResourceBundle;
2728
import java.util.ListResourceBundle;
2829

@@ -36,9 +37,14 @@ public static void main(String[] args) throws Exception {
3637
String loggerMode = args[0];
3738
String loggerClassName = args[1];
3839
String underlyingLoggerClassName = args.length >= 3 ? args[2] : null;
40+
System.err.println("PatchedClient starting at " + Instant.now());
41+
try {
42+
testLogger(loggerMode, loggerClassName, underlyingLoggerClassName);
43+
testLog(underlyingLoggerClassName);
44+
} finally {
45+
System.err.println("PatchedClient finished at " + Instant.now());
46+
}
3947

40-
testLogger(loggerMode, loggerClassName, underlyingLoggerClassName);
41-
testLog(underlyingLoggerClassName);
4248
}
4349

4450
/*

test/jdk/java/lang/System/LoggerFinder/modules/unnamed_client/pkg/b/t/TestB.java

+8-3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
import java.lang.reflect.Method;
2727
import java.lang.System.Logger;
28+
import java.time.Instant;
2829
import java.util.ResourceBundle;
2930
import java.util.ListResourceBundle;
3031

@@ -37,9 +38,13 @@ public static void main(String[] args) throws Exception {
3738
assertTrue(args.length == 2);
3839
String loggerMode = args[0];
3940
String loggerClassName = args[1];
40-
41-
testLogger(loggerMode, loggerClassName);
42-
testLog(loggerClassName);
41+
System.err.println("TestB starting at " + Instant.now());
42+
try {
43+
testLogger(loggerMode, loggerClassName);
44+
testLog(loggerClassName);
45+
} finally {
46+
System.err.println("TestB finished at " + Instant.now());
47+
}
4348
}
4449

4550
/*

0 commit comments

Comments
 (0)