DBZ-2915 Moving Docker config to test class path

This commit is contained in:
Gunnar Morling 2021-01-25 11:06:15 +01:00
parent 7a4d8d990e
commit f2c0d282ef
25 changed files with 4 additions and 6 deletions

View File

@ -59,7 +59,7 @@ void setupDependencies(@Observes ConnectorStartedEvent event) throws IOException
void connectorCompleted(@Observes ConnectorCompletedEvent event) throws Exception {
if (!event.isSuccess()) {
throw (Exception) event.getError().get();
throw new RuntimeException(event.getError().get());
}
}

View File

@ -15,7 +15,6 @@
import org.testcontainers.containers.wait.strategy.Wait;
import io.quarkus.test.common.QuarkusTestResourceLifecycleManager;
import org.testcontainers.utility.MountableFile;
public class PulsarTestResourceLifecycleManager implements QuarkusTestResourceLifecycleManager {
@ -27,9 +26,8 @@ public class PulsarTestResourceLifecycleManager implements QuarkusTestResourceLi
private static final GenericContainer<?> container = new GenericContainer<>(PULSAR_IMAGE)
.withStartupTimeout(Duration.ofSeconds(90))
.waitingFor(Wait.forLogMessage(".*messaging service is ready.*", 1))
.withCommand("/pulsar/bin/pulsar", "standalone")
.withCopyFileToContainer(MountableFile.forHostPath("/docker/conf/"), "/pulsar/conf")
// .withClasspathResourceMapping("/docker/conf/", "/pulsar/conf", BindMode.READ_ONLY)
.withCommand("bin/pulsar", "standalone")
.withClasspathResourceMapping("/docker/conf/", "/pulsar/conf", BindMode.READ_ONLY)
.withExposedPorts(PULSAR_PORT, PULSAR_HTTP_PORT);
@Override
@ -55,6 +53,6 @@ public void stop() {
}
public static String getPulsarServiceUrl() {
return "pulsar://localhost:" + container.getExposedPorts().get(0);
return "pulsar://localhost:" + container.getMappedPort(PULSAR_PORT);
}
}