use of org.apache.ignite.internal.visor.tracing.configuration.VisorTracingConfigurationTaskResult in project ignite by apache.
the class GridCommandHandlerTracingConfigurationTest method testGetAllWithScopeReturnsOnlySpecifiedScopeSpecificConfiguratoin.
/**
* Ensure that in case of "--tracing-configuration get_all --scope TX"
* TX based tracing configuration will be returned: both scope specific and label specific.
*/
@Test
public void testGetAllWithScopeReturnsOnlySpecifiedScopeSpecificConfiguratoin() {
assertEquals(EXIT_CODE_OK, execute(hnd, "--tracing-configuration", "get_all", "--scope", "TX"));
VisorTracingConfigurationTaskResult expRes = new VisorTracingConfigurationTaskResult();
expRes.add(TX_SCOPE_SPECIFIC_COORDINATES, SOME_SCOPE_SPECIFIC_PARAMETERS);
expRes.add(TX_LABEL_SPECIFIC_COORDINATES, SOME_LABEL_SPECIFIC_PARAMETERS);
verifyResult(expRes);
}
use of org.apache.ignite.internal.visor.tracing.configuration.VisorTracingConfigurationTaskResult in project ignite by apache.
the class GridCommandHandlerTracingConfigurationTest method testGetWithScopeReturnsScopeSpecificConfiguratoin.
/**
* Ensure that in case of "--tracing-configuration get --scope TX"
* TX specific and only TX specific tracing configuration will be returned:
* TX-label specific configuration not expected.
*/
@Test
public void testGetWithScopeReturnsScopeSpecificConfiguratoin() {
assertEquals(EXIT_CODE_OK, execute(hnd, "--tracing-configuration", "get", "--scope", "TX"));
// Check command result.
VisorTracingConfigurationTaskResult expRes = new VisorTracingConfigurationTaskResult();
expRes.add(TX_SCOPE_SPECIFIC_COORDINATES, SOME_SCOPE_SPECIFIC_PARAMETERS);
verifyResult(expRes);
}
use of org.apache.ignite.internal.visor.tracing.configuration.VisorTracingConfigurationTaskResult in project ignite by apache.
the class GridCommandHandlerTracingConfigurationTest method verifyResult.
/**
* Verify that expected result equals got one.
*
* @param expRes Expected command result.
*/
private void verifyResult(VisorTracingConfigurationTaskResult expRes) {
VisorTracingConfigurationTaskResult gotRes = hnd.getLastOperationResult();
assertNotNull(gotRes);
assertNotNull(gotRes.tracingConfigurations());
assertTrue(expRes.tracingConfigurations().containsAll(gotRes.tracingConfigurations()) && gotRes.tracingConfigurations().containsAll(expRes.tracingConfigurations()));
}
Aggregations