Skip to content

Commit

Permalink
Disable failing tests on Windows
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
joschi committed Mar 2, 2019
1 parent 7afd8e6 commit c556599
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Expand Up @@ -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;
Expand All @@ -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}";

Expand Down
@@ -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;
Expand All @@ -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(
Expand Down

0 comments on commit c556599

Please sign in to comment.