use of com.alibaba.csp.sentinel.metric.extension.MetricCallbackInit in project Sentinel by alibaba.
the class SpiLoaderTest method testLoadFirstInstance.
@Test
public void testLoadFirstInstance() {
ProcessorSlot slot = SpiLoader.of(ProcessorSlot.class).loadFirstInstance();
assertNotNull(slot);
assertTrue(slot instanceof NodeSelectorSlot);
SlotChainBuilder chainBuilder = SpiLoader.of(SlotChainBuilder.class).loadFirstInstance();
assertNotNull(chainBuilder);
assertTrue(chainBuilder instanceof SlotChainBuilder);
InitFunc initFunc = SpiLoader.of(InitFunc.class).loadFirstInstance();
assertNotNull(initFunc);
assertTrue(initFunc instanceof MetricCallbackInit);
}
Aggregations