use of com.alibaba.csp.sentinel.slotchain.ProcessorSlot in project Sentinel by alibaba.
the class SpiLoaderTest method testLoadInstanceByClass.
@Test
public void testLoadInstanceByClass() {
ProcessorSlot slot = SpiLoader.of(ProcessorSlot.class).loadInstance(StatisticSlot.class);
assertNotNull(slot);
assertTrue(slot instanceof StatisticSlot);
}
use of com.alibaba.csp.sentinel.slotchain.ProcessorSlot in project Sentinel by alibaba.
the class SpiLoaderTest method testLoadInstanceByAliasName.
@Test
public void testLoadInstanceByAliasName() {
ProcessorSlot slot = SpiLoader.of(ProcessorSlot.class).loadInstance("com.alibaba.csp.sentinel.slots.statistic.StatisticSlot");
assertNotNull(slot);
assertTrue(slot instanceof StatisticSlot);
}
Aggregations