use of io.servicecomb.loadbalance.filter.SimpleTransactionControlFilter in project java-chassis by ServiceComb.
the class TestLoadBalancer method testFilter.
@Test
public void testFilter() {
Assert.assertEquals(0, loadBalancer.getFilterSize());
TransactionControlFilter filter = new SimpleTransactionControlFilter();
loadBalancer.putFilter("test", filter);
Assert.assertEquals(1, loadBalancer.getFilterSize());
Assert.assertTrue(loadBalancer.containsFilter("test"));
loadBalancer.removeFilter("test");
Assert.assertEquals(0, loadBalancer.getFilterSize());
Assert.assertFalse(loadBalancer.containsFilter("test"));
}
Aggregations