Search in sources :

Example 11 with VisorTracingConfigurationTaskResult

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);
}
Also used : VisorTracingConfigurationTaskResult(org.apache.ignite.internal.visor.tracing.configuration.VisorTracingConfigurationTaskResult) Test(org.junit.Test)

Example 12 with VisorTracingConfigurationTaskResult

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);
}
Also used : VisorTracingConfigurationTaskResult(org.apache.ignite.internal.visor.tracing.configuration.VisorTracingConfigurationTaskResult) Test(org.junit.Test)

Example 13 with VisorTracingConfigurationTaskResult

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()));
}
Also used : VisorTracingConfigurationTaskResult(org.apache.ignite.internal.visor.tracing.configuration.VisorTracingConfigurationTaskResult)

Aggregations

VisorTracingConfigurationTaskResult (org.apache.ignite.internal.visor.tracing.configuration.VisorTracingConfigurationTaskResult)13 Test (org.junit.Test)11 HashMap (java.util.HashMap)3 TracingConfigurationCoordinates (org.apache.ignite.spi.tracing.TracingConfigurationCoordinates)3 TracingConfigurationParameters (org.apache.ignite.spi.tracing.TracingConfigurationParameters)3 UUID (java.util.UUID)1 GridClient (org.apache.ignite.internal.client.GridClient)1 VisorTracingConfigurationTask (org.apache.ignite.internal.visor.tracing.configuration.VisorTracingConfigurationTask)1