本文整理汇总了Java中org.testcontainers.containers.wait.HttpWaitStrategy类的典型用法代码示例。如果您正苦于以下问题:Java HttpWaitStrategy类的具体用法?Java HttpWaitStrategy怎么用?Java HttpWaitStrategy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HttpWaitStrategy类属于org.testcontainers.containers.wait包,在下文中一共展示了HttpWaitStrategy类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: configure
import org.testcontainers.containers.wait.HttpWaitStrategy; //导入依赖的package包/类
@Override
protected void configure() {
// addExposedPorts(8091, 8092, 8093, 8094, 11207, 11210, 11211, 18091, 18092, 18093);
addFixedExposedPort(8091, 8091);
addFixedExposedPort(8092, 8092);
addFixedExposedPort(8093, 8093);
addFixedExposedPort(8094, 8094);
addFixedExposedPort(8095, 8095);
addFixedExposedPort(11207, 11207);
addFixedExposedPort(11210, 11210);
addFixedExposedPort(11211, 11211);
addFixedExposedPort(18091, 18091);
addFixedExposedPort(18092, 18092);
addFixedExposedPort(18093, 18093);
setWaitStrategy(new HttpWaitStrategy().forPath("/ui/index.html#/"));
}
开发者ID:couchbaselabs,项目名称:GitTalent,代码行数:17,代码来源:CouchbaseContainer.java
示例2: compute
import org.testcontainers.containers.wait.HttpWaitStrategy; //导入依赖的package包/类
@Override protected ElasticsearchHttpStorage compute() {
try {
container = new GenericContainer(image)
.withExposedPorts(9200)
.withEnv("ES_JAVA_OPTS", "-Dmapper.allow_dots_in_name=true -Xms512m -Xmx512m")
.waitingFor(new HttpWaitStrategy().forPath("/"));
container.start();
if (Boolean.valueOf(System.getenv("ES_DEBUG"))) {
container.followOutput(new Slf4jLogConsumer(LoggerFactory.getLogger(image)));
}
System.out.println("Starting docker image " + image);
} catch (RuntimeException e) {
// Ignore
}
ElasticsearchHttpStorage result = computeStorageBuilder().build();
CheckResult check = result.check();
if (check.ok()) {
return result;
} else {
throw new AssumptionViolatedException(check.error().getMessage(), check.error());
}
}
开发者ID:openzipkin,项目名称:zipkin-dependencies,代码行数:24,代码来源:LazyElasticsearchHttpStorage.java
示例3: configure
import org.testcontainers.containers.wait.HttpWaitStrategy; //导入依赖的package包/类
@Override
protected void configure() {
addFixedExposedPort(8091, 8091);
addFixedExposedPort(8092, 8092);
addFixedExposedPort(8093, 8093);
addFixedExposedPort(8094, 8094);
addFixedExposedPort(8095, 8095);
addFixedExposedPort(11207, 11207);
addFixedExposedPort(11210, 11210);
addFixedExposedPort(11211, 11211);
addFixedExposedPort(18091, 18091);
addFixedExposedPort(18092, 18092);
addFixedExposedPort(18093, 18093);
setWaitStrategy(new HttpWaitStrategy().forPath("/ui/index.html#/"));
}
开发者ID:couchbaselabs,项目名称:GitTalent,代码行数:16,代码来源:CouchbaseContainer.java
示例4: buildWaitStrategy
import org.testcontainers.containers.wait.HttpWaitStrategy; //导入依赖的package包/类
/**
* @param ready the AtomicBoolean on which to indicate success
* @return the WaitStrategy under test
*/
@NotNull
protected HttpWaitStrategy buildWaitStrategy(final AtomicBoolean ready) {
return new HttpWaitStrategy() {
@Override
protected void waitUntilReady() {
// blocks until ready or timeout occurs
super.waitUntilReady();
ready.set(true);
}
}.forResponsePredicate(s -> s.equals(GOOD_RESPONSE_BODY));
}
开发者ID:testcontainers,项目名称:testcontainers-java,代码行数:16,代码来源:HttpWaitStrategyTest.java
示例5: configure
import org.testcontainers.containers.wait.HttpWaitStrategy; //导入依赖的package包/类
@Override
protected void configure() {
addExposedPorts(8091, 8092, 8093, 8094, 11207, 11210, 11211, 18091, 18092, 18093);
setWaitStrategy(new HttpWaitStrategy().forPath("/ui/index.html#/"));
}
开发者ID:ldoguin,项目名称:testcontainers-spring-boot-couchbase,代码行数:6,代码来源:CouchbaseContainer.java
注:本文中的org.testcontainers.containers.wait.HttpWaitStrategy类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论