Skip to content

Commit

Permalink
Fixes the random port setup for following tests
Browse files Browse the repository at this point in the history
While running on Windows, the random port generated for this test case, e.g. 54320,
is taken up for all other tests running AFTER this one.
That clashes with TestHTTPConfigSourceProvider who gives you erroneously 8181.
  • Loading branch information
Karm committed Feb 12, 2020
1 parent 7662597 commit 0eabb66
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

Expand All @@ -31,4 +32,9 @@ public void portShouldNotBeZero() {
assertThat(url.getPort()).isNotZero();
}

@AfterAll
public static void teardown() {
System.clearProperty("quarkus.http.test-port");
}

}

0 comments on commit 0eabb66

Please sign in to comment.