From 192e4acde4554e7faaf2cf1273a5e6aa8a549e38 Mon Sep 17 00:00:00 2001 From: liubao Date: Tue, 17 Mar 2020 16:54:56 +0800 Subject: [PATCH] [SCB-1804] fix random fail test case --- .../client/http/TestServiceRegistryClientImpl.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/client/http/TestServiceRegistryClientImpl.java b/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/client/http/TestServiceRegistryClientImpl.java index 61c179d7ce..5c6384c5a1 100644 --- a/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/client/http/TestServiceRegistryClientImpl.java +++ b/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/client/http/TestServiceRegistryClientImpl.java @@ -147,7 +147,11 @@ public void doAppend(LoggingEvent event) { }.getMockInstance(); rootLogger.addAppender(appender); - doRun(events); + try { + doRun(events); + } catch (Throwable e) { + e.printStackTrace(); + } rootLogger.removeAppender(appender); } @@ -175,6 +179,14 @@ void doRun(java.util.List events) { @Test public void testRegisterSchemaException() { + new MockUp() { + @Mock + void put(IpPort ipPort, String uri, RequestParam requestParam, + Handler responseHandler) { + // do nothing to mock null response + } + }; + InterruptedException e = new InterruptedException(); new MockUp() { @Mock