在使用Spring和Wiremock进行集成测试时,我遇到了一个非常奇怪的情况:突然,一个特定的测试开始间歇性地失败。下面是错误的片段:
org.springframework.web.client.ResourceAccessException: I/O error on POST request for "http://localhost:10314/my/endpoint": Software caused connection abort: recv failed; nested exception is java.net.SocketException: Softwa
我正在使用Spring Boot编写一套微服务,并且需要运行一些BDD样式的集成测试,以测试彼此独立的微服务。为了弄清楚是怎么做的,我用Spring Cloud contract在其中一个生产者上写了一个非常简单的契约。这就是它: org.springframework.cloud.contract.spec.Contract.make {
description("Contract for the command endpoint where a consumer can send the service individual commands")
我在集成测试中使用wiremock来模拟外部操作员响应:
@ClassRule
public static WireMockClassRule zainWireMockStatic = new WireMockClassRule(9900);
并获得此异常
requesting to java.net.SocketTimeoutException: connect timed out timed out
这是我的wiremock
private static void wireMockZainUnSubscriptionRequest() {
zainWireMockStat
我最近用Slick等更新了我的Play Scala项目到2.3.8。
从那时起,我使用Wiremock的单元测试就一直失败。
错误看起来是:
The future returned an exception of type: java.lang.RuntimeException, with message: There is no started application.
如有任何帮助/建议,我将不胜感激?
class BlahTest extends FunSuite
with MockitoSugar with ScalaFutures
with SpanSugar with
我有一个WCF服务,运行在比如说上,需要为集成测试设置一个wiremock存根。我有以下代码作为第一次尝试:
var server = WireMockServer.Start();
server
.Given(
Request.Create().WithPath("http://localhost:8072/").UsingPost()
)
.RespondWith(
Respo
我们正在使用来收听Kafka主题并调用rest服务。我们还实现了一个自定义StreamRetryTemplate来指定哪些错误是可以恢复的,哪些是不能恢复的。在运行时如何工作和在集成测试中如何工作之间,我无法得到一致的结果。
我已经在调试模式中验证了异常是否被正确抛出,并且RetryTemplate被正确注入,但它似乎没有被用于集成测试。
@EnableBinding(Sink::class)
class MyListener(private val myService: Service) {
@StreamListener(Sink.Input)
fun consume(@Payl
在我的机器人android测试中尝试启动一个WireMockServer时,得到了下面的堆栈跟踪。可能是Apache客户端的两个版本之间的冲突,但我还没有解决它。有什么想法吗?
java.lang.NoSuchMethodError: org.apache.http.conn.ssl.SSLSocketFactory.<init>
at com.github.tomakehurst.wiremock.http.HttpClientFactory.createSslSocketFactory(HttpClientFactory.java:110)
at com.github.toma
我有以下情况:
@Transactional
@SpringBootTest
@ActiveProfiles("test")
@AutoConfigureMockMvc
@AutoConfigureWireMock(port = 0)
public abstract class IntegrationTest {
}
public class Test1 extends IntegrationTest {
// Tests that use WireMock
}
@ActiveProfiles("specific-case-test") // This