assertTrue(cim.registerContextInfoRetriever(RETRIEVER_NAME_1, ContextInfoRetrieverStubs.STRING_RETRIEVER));
assertTrue(session.enableEvent(EVENT_NAME, null, false,
- "$app." + RETRIEVER_NAME_1 + '.' + CONTEXT_NAME + "==\"" + ContextInfoRetrieverStubs.STRING_VALUE + '\"'));
+ "$app." + RETRIEVER_NAME_1 + ':' + CONTEXT_NAME + "==\"" + ContextInfoRetrieverStubs.STRING_VALUE + '\"'));
assertTrue(session.start());
sendEventsToLoggers();
assertTrue(cim.registerContextInfoRetriever(RETRIEVER_NAME_1, ContextInfoRetrieverStubs.STRING_RETRIEVER));
assertTrue(session.enableEvent(EVENT_NAME, null, false,
- "$app." + RETRIEVER_NAME_1 + '.' + CONTEXT_NAME + "!=\"" + ContextInfoRetrieverStubs.STRING_VALUE + '\"'));
+ "$app." + RETRIEVER_NAME_1 + ':' + CONTEXT_NAME + "!=\"" + ContextInfoRetrieverStubs.STRING_VALUE + '\"'));
assertTrue(session.enableAppContext(RETRIEVER_NAME_1, CONTEXT_NAME));
assertTrue(session.start());
assertTrue(cim.registerContextInfoRetriever(RETRIEVER_NAME_1, ContextInfoRetrieverStubs.STRING_RETRIEVER));
assertTrue(session.enableEvent(EVENT_NAME, null, false,
- "$app." + RETRIEVER_NAME_1 + '.' + CONTEXT_NAME + "==\"" + ContextInfoRetrieverStubs.STRING_VALUE + '\"'));
+ "$app." + RETRIEVER_NAME_1 + ':' + CONTEXT_NAME + "==\"" + ContextInfoRetrieverStubs.STRING_VALUE + '\"'));
assertTrue(session.enableAppContext(RETRIEVER_NAME_1, CONTEXT_NAME));
assertTrue(session.start());
List<String> expectedDisabledCommands = Arrays.asList(EVENT_NAME_A, EVENT_NAME_B);
assertEquals(expectedEnabledCommands, clientListener.getEnabledEventCommands());
- assertEquals(expectedDisabledCommands, clientListener.getDisabledEventCommands());
+ assertTrue(clientListener.getDisabledEventCommands().containsAll(expectedDisabledCommands));
}
/**
@Test
public void testContextInFilterString() {
try (ILttngSession session2 = ILttngSession.createSession(null, SESSION_DOMAIN);) {
- session2.enableEvent(EVENT_NAME_A, null, false, "$app." + CONTEXT_RETRIEVER_NAME_A + ':' + CONTEXT_NAME_A + "=\"bozo\"");
+ session2.enableEvent(EVENT_NAME_A, null, false, "$app." + CONTEXT_RETRIEVER_NAME_A + ':' + CONTEXT_NAME_A + "==\"bozo\"");
List<String> expectedEnabledCommands = Collections.singletonList(CONTEXT_RETRIEVER_NAME_A + ':' + CONTEXT_NAME_A);
assertEquals(expectedEnabledCommands, clientListener.getEnabledAppContextCommands());
@Test
public void testContextEnabledAndInFilterString() {
try (ILttngSession session2 = ILttngSession.createSession(null, SESSION_DOMAIN);) {
- session2.enableEvent(EVENT_NAME_A, null, false, "$app." + CONTEXT_RETRIEVER_NAME_A + ':' + CONTEXT_NAME_A + "=\"bozo\"");
+ session2.enableEvent(EVENT_NAME_A, null, false, "$app." + CONTEXT_RETRIEVER_NAME_A + ':' + CONTEXT_NAME_A + "==\"bozo\"");
session2.enableAppContext(CONTEXT_RETRIEVER_NAME_A, CONTEXT_NAME_A);
List<String> expectedEnabledCommands = Collections.nCopies(2, CONTEXT_RETRIEVER_NAME_A + ':' + CONTEXT_NAME_A);