Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

Commit e539a41

Browse files
committed
fix: move test annotations to separate lines
The test annotations in the following files were on the same line as the method signature: - samples/native-image-sample/src/test/java/com/example/logging/ITNativeImageLoggingSample.java - samples/snippets/src/test/java/com/example/logging/LoggingIT.java - samples/snippets/src/test/java/com/example/logging/LogsIT.java - samples/snippets/src/test/java/com/example/logging/SinkIT.java This change moves the annotations to their own lines to improve code readability and adhere to Java coding conventions.
1 parent 0b2616d commit e539a41

4 files changed

Lines changed: 16 additions & 8 deletions

File tree

samples/native-image-sample/src/test/java/com/example/logging/ITNativeImageLoggingSample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ void tearDown() {
3939
System.setOut(originalStdOut);
4040
}
4141

42-
@Test void testLogging() throws Exception {
42+
@Test
43+
void testLogging() throws Exception {
4344
NativeImageLoggingSample.main(new String[] {});
4445
assertThat(stdOutCaptor.toString("UTF-8"))
4546
.contains("Logged: This is a log produced by Native Image.");

samples/snippets/src/test/java/com/example/logging/LoggingIT.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,15 @@ public static void shutDown() throws Exception {
7979
logging.close();
8080
}
8181

82-
@BeforeEach void setUp() {
82+
@BeforeEach
83+
void setUp() {
8384
bout = new ByteArrayOutputStream();
8485
out = new PrintStream(bout);
8586
System.setOut(out);
8687
}
8788

88-
@AfterEach void tearDown() throws Exception {
89+
@AfterEach
90+
void tearDown() throws Exception {
8991
// Clean up created logs
9092
deleteLog(TEST_LOG);
9193
System.setOut(null);

samples/snippets/src/test/java/com/example/logging/LogsIT.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@ class LogsIT {
3232
private ByteArrayOutputStream bout;
3333
private PrintStream out;
3434

35-
@BeforeEach void setUp() {
35+
@BeforeEach
36+
void setUp() {
3637
bout = new ByteArrayOutputStream();
3738
out = new PrintStream(bout);
3839
System.setOut(out);
3940
}
4041

41-
@AfterEach void tearDown() {
42+
@AfterEach
43+
void tearDown() {
4244
System.setOut(null);
4345
}
4446

samples/snippets/src/test/java/com/example/logging/SinkIT.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ class SinkIT {
3939
private Logging logging = LoggingOptions.getDefaultInstance().getService();
4040
private static final String SINK_NAME = "test-sink" + UUID.randomUUID().toString();
4141

42-
@BeforeEach void setUp() {
42+
@BeforeEach
43+
void setUp() {
4344
// Create sink
4445
logging.create(
4546
SinkInfo.newBuilder(SINK_NAME, SinkInfo.Destination.DatasetDestination.of("dataset"))
@@ -48,13 +49,15 @@ class SinkIT {
4849
.build());
4950
}
5051

51-
@AfterEach void tearDown() throws Exception {
52+
@AfterEach
53+
void tearDown() throws Exception {
5254
// Delete sink
5355
logging.deleteSink(SINK_NAME);
5456
logging.close();
5557
}
5658

57-
@Test void testGetSinkMetadata() throws Exception {
59+
@Test
60+
void testGetSinkMetadata() throws Exception {
5861
Sink sink = logging.getSink(SINK_NAME);
5962
assertNotNull(sink);
6063
PrintStream standardOut = System.out;

0 commit comments

Comments
 (0)