[mongodb] [tests] Loosen E2E timeout limitations

This closes #2334.
pull/2343/head
yuxiqian 2 years ago committed by GitHub
parent 2cf3723354
commit 883b6846ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -93,7 +93,8 @@ public class MongoE2eITCase extends FlinkContainerTestEnvironment {
.withSharding()
.withNetwork(NETWORK)
.withNetworkAliases(INTER_CONTAINER_MONGO_ALIAS)
.withLogConsumer(new Slf4jLogConsumer(LOG));
.withLogConsumer(new Slf4jLogConsumer(LOG))
.withStartupTimeout(Duration.ofSeconds(120));
Startables.deepStart(Stream.of(container)).join();
@ -230,7 +231,7 @@ public class MongoE2eITCase extends FlinkContainerTestEnvironment {
expectResult,
"mongodb_products_sink",
new String[] {"id", "name", "description", "weight"},
60000L);
150000L);
}
private Document productDocOf(String id, String name, String description, Double weight) {

@ -28,6 +28,7 @@ import java.io.IOException;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.time.Duration;
import java.util.Random;
import java.util.function.Consumer;
import java.util.regex.Matcher;
@ -111,6 +112,11 @@ public class MongoDBContainer extends org.testcontainers.containers.MongoDBConta
return (MongoDBContainer) super.withNetworkAliases(aliases);
}
@Override
public MongoDBContainer withStartupTimeout(Duration timeout) {
return (MongoDBContainer) super.withStartupTimeout(timeout);
}
public void executeCommand(String command) {
try {
LOG.info("Executing mongo command: {}", command);

Loading…
Cancel
Save