Skip to content

Commit

Permalink
--other=add unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
smartboyjia committed Jun 14, 2024
1 parent ebfdbcf commit 4c5e1fc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -420,4 +420,16 @@ public void testExceptionAsyncSelectOne() {
return;
}
}

@Test
public void testExceptionReport() {
PolarisSelector clusterNaming = new PolarisSelector();
clusterNaming.setPluginConfig(selectorConfig);
clusterNaming.init();
try {
clusterNaming.report(null, 1, -1L);
} catch (Exception e) {
return;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@

import com.tencent.polaris.api.pojo.ServiceInstances;
import com.tencent.polaris.factory.config.consumer.CircuitBreakerConfigImpl;
import com.tencent.trpc.core.common.config.PluginConfig;
import com.tencent.trpc.core.selector.SelectorManager;
import com.tencent.trpc.core.selector.spi.Selector;
import com.tencent.trpc.selector.open.polaris.DataTest;
import com.tencent.trpc.selector.polaris.PolarisSelector;
import org.junit.Assert;
import org.junit.Test;
Expand Down

0 comments on commit 4c5e1fc

Please sign in to comment.