Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
laywin committed Dec 19, 2023
1 parent 508505f commit bb875e5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

import io.seata.common.ConfigurationKeys;
import io.seata.common.util.CollectionUtils;
import io.seata.common.util.StringUtils;
import io.seata.config.ConfigurationCache;
import io.seata.config.ConfigurationFactory;

Expand Down Expand Up @@ -153,9 +154,11 @@ default void removeOfflineAddressesIfNecessary(String clusterName, Collection<In
// empty addresses && currentClusterName == clusterName, enable push empty protection
if (CollectionUtils.isEmpty(inetSocketAddresses)) {
String txServiceGroupName = ConfigurationFactory.getInstance().getConfig(ConfigurationKeys.TX_SERVICE_GROUP);
String currentClusterName = getServiceGroup(txServiceGroupName);
if (Objects.equals(currentClusterName, clusterName)) {
return;
if (StringUtils.isNotBlank(txServiceGroupName)) {
String currentClusterName = getServiceGroup(txServiceGroupName);
if (Objects.equals(currentClusterName, clusterName)) {
return;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void testTransportProperties() {

@Test
public void testShutdownProperties() {
assertEquals(3L, context.getBean(ShutdownProperties.class).getWait());
assertEquals(13L, context.getBean(ShutdownProperties.class).getWait());
}

@Test
Expand Down

0 comments on commit bb875e5

Please sign in to comment.