From c55659941b57aaae801d1d90527fc9bcc4c432ab Mon Sep 17 00:00:00 2001 From: Jochen Schalanda Date: Sat, 2 Mar 2019 22:18:36 +0100 Subject: [PATCH] Disable failing tests on Windows * CustomRequestLogPatternIntegrationTest * RequestLogPatternIntegrationTest Example exception (shortened): ERROR [2019-03-02 10:38:12,736] org.junit.jupiter.engine.execution.JupiterEngineExecutionContext: Caught exception while closing extension context: org.junit.jupiter.engine.descriptor.MethodExtensionContext@72bca894 java.io.IOException: Failed to delete temp directory C:\Users\appveyor\AppData\Local\Temp\1\junit6846106039914940147. The following paths could not be deleted (see suppressed exceptions for details): , example-new-app-not-additive.log, example-new-app.log, example.log at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:206) at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:167) Suppressed: java.nio.file.DirectoryNotEmptyException: C:\Users\appveyor\AppData\Local\Temp\1\junit6846106039914940147 at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath$1.deleteAndContinue(TempDirectory.java:187) at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath$1.postVisitDirectory(TempDirectory.java:182) at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath$1.postVisitDirectory(TempDirectory.java:173) at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.deleteAllFilesAndDirectories(TempDirectory.java:173) at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:165) ... 44 common frames omitted Suppressed: java.nio.file.FileSystemException: C:\Users\appveyor\AppData\Local\Temp\1\junit6846106039914940147\example.log: The process cannot access the file because it is being used by another process. --- .../request_log/CustomRequestLogPatternIntegrationTest.java | 3 +++ .../example/request_log/RequestLogPatternIntegrationTest.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/dropwizard-e2e/src/test/java/com/example/request_log/CustomRequestLogPatternIntegrationTest.java b/dropwizard-e2e/src/test/java/com/example/request_log/CustomRequestLogPatternIntegrationTest.java index 65951d31a1b..33917d511d4 100644 --- a/dropwizard-e2e/src/test/java/com/example/request_log/CustomRequestLogPatternIntegrationTest.java +++ b/dropwizard-e2e/src/test/java/com/example/request_log/CustomRequestLogPatternIntegrationTest.java @@ -2,6 +2,8 @@ import io.dropwizard.testing.ConfigOverride; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledOnOs; +import org.junit.jupiter.api.condition.OS; import java.nio.file.Files; import java.util.ArrayList; @@ -10,6 +12,7 @@ import static java.nio.charset.StandardCharsets.UTF_8; import static org.assertj.core.api.Assertions.assertThat; +@DisabledOnOs(OS.WINDOWS) // FIXME: Make tests run on Windows class CustomRequestLogPatternIntegrationTest extends AbstractRequestLogPatternIntegrationTest { private static final String LOG_FORMAT = "%h|%reqParameter{name}|%m|%U|%s|%b|%i{User-Agent}|%responseHeader{Content-Type}"; diff --git a/dropwizard-e2e/src/test/java/com/example/request_log/RequestLogPatternIntegrationTest.java b/dropwizard-e2e/src/test/java/com/example/request_log/RequestLogPatternIntegrationTest.java index 6721bda2cc5..bff4cf9ef57 100644 --- a/dropwizard-e2e/src/test/java/com/example/request_log/RequestLogPatternIntegrationTest.java +++ b/dropwizard-e2e/src/test/java/com/example/request_log/RequestLogPatternIntegrationTest.java @@ -1,6 +1,8 @@ package com.example.request_log; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledOnOs; +import org.junit.jupiter.api.condition.OS; import java.nio.file.Files; import java.util.List; @@ -9,6 +11,7 @@ import static java.nio.charset.StandardCharsets.UTF_8; import static org.assertj.core.api.Assertions.assertThat; +@DisabledOnOs(OS.WINDOWS) // FIXME: Make tests run on Windows class RequestLogPatternIntegrationTest extends AbstractRequestLogPatternIntegrationTest { private static final Pattern REQUEST_LOG_PATTERN = Pattern.compile(