funky-eyes commented on code in PR #6004:
URL: https://github.com/apache/incubator-seata/pull/6004#discussion_r1441548112
##########
core/src/test/java/io/seata/core/rpc/netty/TmNettyClientTest.java:
##########
@@ -123,6 +135,24 @@ public void setApplicationId() throws Exception {
}
+ @AfterAll
+ public static void afterAll() {
+ TmNettyRemotingClient.getInstance().destroy();
+
System.setProperty(ConfigurationKeys.ENABLE_TM_CLIENT_CHANNEL_CHECK_FAIL_FAST,
"false");
+ }
+
+ @Test
+ public void testCheckFailFast() throws Exception {
+ TmNettyRemotingClient.getInstance().destroy();
+ TmNettyRemotingClient tmClient =
TmNettyRemotingClient.getInstance("fail_fast", "default_tx_group");
+ System.setProperty("file.listener.enabled", "true");
+
ConfigurationCache.addConfigListener(ConfigurationKeys.ENABLE_TM_CLIENT_CHANNEL_CHECK_FAIL_FAST,
+ event -> logger.info("dataId:{}, value: {}, oldValue: {}",
event.getDataId(), event.getNewValue(),
+ event.getOldValue()));
+
System.setProperty(ConfigurationKeys.ENABLE_TM_CLIENT_CHANNEL_CHECK_FAIL_FAST,
"true");
+ Assertions.assertThrows(FrameworkException.class, tmClient::init);
Review Comment:
```suggestion
Thread.sleep(2000);
Assertions.assertThrows(FrameworkException.class, tmClient::init);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]