use of org.apache.ignite.spi.tracing.NoopTracingSpi in project ignite by apache.
the class MixedTracingSpiTest method testNodesWithDifferentTracingSpiPrintsWarningOnConsistencyCheck.
/**
* Start two nodes: one with noop tracing spi and another one with open census tracing spi.
* <p/>
* Cause both tracing spi instances are annotated with {@code @IgniteSpiConsistencyChecked(optional = true)}
* 'Remote SPI with the same name is not configured: <TracingSpiInstance></>' warning message is expected on
* node start.
* <p/>
* Besides that 'Failed to create span from serialized value' is expected, cause it's not possible
* to deserialize {@code NoopSpan.INSTANCE} from {@link NoopTracingSpi} on the node
* with {@link OpenCensusTracingSpi}.
*
* @throws Exception If failed.
*/
@Test
public void testNodesWithDifferentTracingSpiPrintsWarningOnConsistencyCheck() throws Exception {
List<LogListener> listeners = prepareLogListeners();
startGrid(getConfiguration(getTestIgniteInstanceName(0) + "node-with-noop-tracing").setTracingSpi(new NoopTracingSpi()).setGridLogger(testLog));
startGrid(getConfiguration(getTestIgniteInstanceName(1) + "node-with-open-census-tracing").setTracingSpi(new OpenCensusTracingSpi()).setGridLogger(testLog));
listeners.forEach(lsnr -> assertTrue(lsnr.check()));
}
use of org.apache.ignite.spi.tracing.NoopTracingSpi in project ignite by apache.
the class MixedTracingSpiTest method testNodesWithNoopTracingSpiPrintsNothingOnConsistencyCheck.
/**
* Start two nodes, both with noop tracing spi instances. No warning messages are expected.
*
* @throws Exception If failed.
*/
@Test
public void testNodesWithNoopTracingSpiPrintsNothingOnConsistencyCheck() throws Exception {
List<LogListener> listeners = prepareLogListeners();
startGrid(getConfiguration(getTestIgniteInstanceName(0) + "node-with-noop-tracing").setTracingSpi(new NoopTracingSpi()).setGridLogger(testLog));
startGrid(getConfiguration(getTestIgniteInstanceName(1) + "node-with-noop-tracing").setTracingSpi(new NoopTracingSpi()).setGridLogger(testLog));
listeners.forEach(lsnr -> assertFalse(lsnr.check()));
}
Aggregations