Skip to content

Commit d22a005

Browse files
committed
#26 Fix failing tests due to the recently added RotationPolicy#stop().
1 parent 68a53c1 commit d22a005

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/maven.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ jobs:
5353
timeout-minutes: 1
5454
# pwsh (the default shell on Windows) hijacks "exec" keyword
5555
shell: bash
56-
run: ./mvnw exec:java -Dexec.classpathScope=test -Dexec.mainClass=com.vlkan.rfos.SchedulerShutdownTestApp
56+
run: ./mvnw -V -B --no-transfer-progress -e "-DtrimStackTrace=false" exec:java -Dexec.classpathScope=test -Dexec.mainClass=com.vlkan.rfos.SchedulerShutdownTestApp

src/test/java/com/vlkan/rfos/RotatingFileOutputStreamTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,9 @@ void test_write_sensitive_policy() throws Exception {
284284
// Verify no more callback interactions.
285285
Mockito.verifyNoMoreInteractions(callback);
286286

287+
// Close the stream to avoid Windows failing to clean the temporary directory.
288+
stream.close();
289+
287290
}
288291

289292
@Test
@@ -337,6 +340,9 @@ void test_empty_files_are_not_rotated() throws Exception {
337340
// Verify the rotation skip.
338341
Mockito.verifyNoMoreInteractions(callback);
339342

343+
// Close the stream to avoid Windows failing to clean the temporary directory.
344+
stream.close();
345+
340346
}
341347

342348
@Test

0 commit comments

Comments
 (0)