logstash icon indicating copy to clipboard operation
logstash copied to clipboard

DLQ tests fails on Windows platform

Open andsel opened this issue 2 years ago • 1 comments

Build scan: https://buildkite.com/elastic/logstash-windows-jdk-matrix-pipeline/builds/69#018cedf7-996c-4f7b-811f-04d9f80d826a/6-3451

Repro line: On a Windows 16 host with JDK 17 (OpenJDK 64-Bit Server VM Temurin-17.0.9+9 (build 17.0.9+9, mixed mode, sharing))

.\gradlew clean :logstash-core:javaTests --tests org.logstash.common.io.DeadLetterQueueWriterAgeRetentionTest

Reproduces locally?: yes

Applicable branches: main

Failure history:

Failure excerpt:

    [WARN ] 2024-01-09 13:51:44.218 [dlq-flush-check] DeadLetterQueueWriter - Unable to finalize segment
    java.nio.file.NoSuchFileException: C:\Users\ANDREA~1\AppData\Local\Temp\2\junit10767190653372662389\junit9776528272669635734\1.log.tmp -> C:\Users\ANDREA~1\AppData\Local\Temp\2\junit10767190653372662389\junit9776528272669635734\1.log
        at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85) ~[?:?]
        at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103) ~[?:?]
        at sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:317) ~[?:?]
        at sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:293) ~[?:?]
        at java.nio.file.Files.move(Files.java:1432) ~[?:?]
        at org.logstash.common.io.DeadLetterQueueWriter.sealSegment(DeadLetterQueueWriter.java:598) ~[main/:?]
        at org.logstash.common.io.DeadLetterQueueWriter.finalizeSegment(DeadLetterQueueWriter.java:584) ~[main/:?]
        at org.logstash.common.io.DeadLetterQueueWriter.scheduledFlushCheck(DeadLetterQueueWriter.java:555) ~[main/:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
        at java.lang.Thread.run(Thread.java:840) [?:?]

org.logstash.common.io.DeadLetterQueueWriterAgeRetentionTest > testDLQWriterFlusherRemovesExpiredSegmentWhenCurrentHeadSegmentIsEmpty FAILED
    org.awaitility.core.ConditionTimeoutException: Condition with alias 'After the flush interval head segment is sealed and a fresh empty head is created' didn't complete within 1 seconds because condition with org.logstash.common.io.DeadLetterQueueWriterAgeRetentionTest was not fulfilled.
        at app//org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
        at app//org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
        at app//org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
        at app//org.awaitility.core.ConditionFactory.until(ConditionFactory.java:985)
        at app//org.awaitility.core.ConditionFactory.until(ConditionFactory.java:954)
        at app//org.logstash.common.io.DeadLetterQueueWriterAgeRetentionTest.testDLQWriterFlusherRemovesExpiredSegmentWhenCurrentHeadSegmentIsEmpty(DeadLetterQueueWriterAgeRetentionTest.java:362)

org.logstash.common.io.DeadLetterQueueWriterAgeRetentionTest > testDLQWriterCloseRemovesExpiredSegmentWhenCurrentWriterIsUntouched PASSED

--------------------------------------------------------------------
|  Results: FAILURE (6 tests, 5 successes, 1 failures, 0 skipped)  |
--------------------------------------------------------------------

6 tests completed, 1 failed

> Task :logstash-core:javaTests FAILED

FAILURE: Build failed with an exception.

Please note that in logs there is plenty of these

 [dlq-flush-check] DeadLetterQueueWriter - Unable to finalize segment

Which doesn't happen on Linux/Macos.

andsel avatar Jan 09 '24 13:01 andsel

The test has been silenced temporarily on Windows with issue #15768 and PR #15843

andsel avatar Jan 24 '24 07:01 andsel