[mongodb] [tests] Loosen E2E timeout limitations

This closes #2334.

(cherry picked from commit 883b6846ad)
pull/2694/head
yuxiqian 2 years ago committed by Leonard Xu
parent 0ff6e26fc6
commit 30e9761290

@ -100,7 +100,8 @@ public class MongoE2eITCase extends FlinkContainerTestEnvironment {
new MongoDBContainer(NETWORK, MongoDBContainer.ShardingClusterRole.ROUTER)
.dependsOn(shard)
.withNetworkAliases(INTER_CONTAINER_MONGO_ALIAS)
.withLogConsumer(new Slf4jLogConsumer(LOG));
.withLogConsumer(new Slf4jLogConsumer(LOG))
.withStartupTimeout(Duration.ofSeconds(120));
Startables.deepStart(Stream.of(config)).join();
Startables.deepStart(Stream.of(shard)).join();
@ -237,7 +238,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) {

@ -30,6 +30,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.regex.Matcher;
import java.util.regex.Pattern;
@ -101,6 +102,11 @@ public class MongoDBContainer extends GenericContainer<MongoDBContainer> {
return String.format("%s:%s", getContainerIpAddress(), getMappedPort(MONGODB_PORT));
}
@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