Created
May 1, 2020 15:32
-
-
Save mklueh/fb78f6178da43ad80cd8962d2cf925a1 to your computer and use it in GitHub Desktop.
Annotation order matters when using TestContainers with QuarkusTest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Testcontainers | |
@QuarkusTest | |
@SuppressWarnings("ALL") | |
@QuarkusTestResource(H2DatabaseTestResource.class) | |
class PostTest { | |
public static final int PORT = 5431; | |
@ClassRule | |
static PostgreSQLContainer db = new PostgreSQLContainer<>("postgres") | |
.withDatabaseName("postgres") | |
.withUsername("postgres") | |
.withPassword("postgres") | |
.withNetworkAliases("postgres") | |
.withExposedPorts(PORT) | |
.withStartupTimeout(Duration.ofMinutes(5)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment