You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2020/02/24 03:18:50 UTC
[servicecomb-java-chassis] 02/02: [SCB-1785] fix integration test
will fail sometimes
This is an automated email from the ASF dual-hosted git repository.
liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git
commit 89d4c4b53e147948cb8e2838dda3964168d3de87
Author: liubao <bi...@qq.com>
AuthorDate: Fri Feb 21 17:25:16 2020 +0800
[SCB-1785] fix integration test will fail sometimes
---
.../servicecomb/it/testcase/TestRestVertxTransportConfig.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/testcase/TestRestVertxTransportConfig.java b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/testcase/TestRestVertxTransportConfig.java
index c5f0904..63615f5 100644
--- a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/testcase/TestRestVertxTransportConfig.java
+++ b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/testcase/TestRestVertxTransportConfig.java
@@ -19,15 +19,15 @@ package org.apache.servicecomb.it.testcase;
import static org.junit.Assert.fail;
+import org.apache.servicecomb.foundation.common.utils.ExceptionUtils;
import org.apache.servicecomb.it.Consumers;
import org.apache.servicecomb.swagger.invocation.exception.InvocationException;
+import org.hamcrest.CoreMatchers;
import org.junit.Assert;
import org.junit.Test;
import com.google.common.base.Strings;
-import io.netty.handler.codec.TooLongFrameException;
-
public class TestRestVertxTransportConfig {
// GET /v1/restServerConfig/testMaxInitialLineLength?q=...... HTTP/1.1
private static final String INITIAL_LINE_SUFFIX = " HTTP/1.1";
@@ -85,8 +85,8 @@ public class TestRestVertxTransportConfig {
consumers.getIntf().testClientReceiveHeaderSize(100001 - RESPONSE_HEADER.length());
fail("an exception is expected!");
} catch (InvocationException e) {
- Assert.assertEquals(TooLongFrameException.class, e.getCause().getClass());
- Assert.assertEquals("HTTP header is larger than 10000 bytes.", e.getCause().getMessage());
+ Assert.assertThat(ExceptionUtils.getExceptionMessageWithoutTrace(e),
+ CoreMatchers.containsString("HTTP header is larger than 10000 bytes."));
}
}
}