From: Alexandre Montplaisir Date: Fri, 5 Feb 2016 23:07:10 +0000 (-0500) Subject: Fix latest tests X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d838d83536013a25de00acf93d0e2c30ec9cf3c3;p=lttng-ust-java-tests.git Fix latest tests Signed-off-by: Alexandre Montplaisir --- diff --git a/lttng-ust-java-tests-common/src/main/java/org/lttng/ust/agent/integration/context/AppContextITBase.java b/lttng-ust-java-tests-common/src/main/java/org/lttng/ust/agent/integration/context/AppContextITBase.java index 7cc3471..65eff8d 100644 --- a/lttng-ust-java-tests-common/src/main/java/org/lttng/ust/agent/integration/context/AppContextITBase.java +++ b/lttng-ust-java-tests-common/src/main/java/org/lttng/ust/agent/integration/context/AppContextITBase.java @@ -491,7 +491,7 @@ public abstract class AppContextITBase { 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(); @@ -516,7 +516,7 @@ public abstract class AppContextITBase { 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()); @@ -540,7 +540,7 @@ public abstract class AppContextITBase { 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()); diff --git a/lttng-ust-java-tests-common/src/test/java/org/lttng/ust/agent/integration/client/TcpClientIT.java b/lttng-ust-java-tests-common/src/test/java/org/lttng/ust/agent/integration/client/TcpClientIT.java index d89571d..ab27da6 100644 --- a/lttng-ust-java-tests-common/src/test/java/org/lttng/ust/agent/integration/client/TcpClientIT.java +++ b/lttng-ust-java-tests-common/src/test/java/org/lttng/ust/agent/integration/client/TcpClientIT.java @@ -255,7 +255,7 @@ public class TcpClientIT { List expectedDisabledCommands = Arrays.asList(EVENT_NAME_A, EVENT_NAME_B); assertEquals(expectedEnabledCommands, clientListener.getEnabledEventCommands()); - assertEquals(expectedDisabledCommands, clientListener.getDisabledEventCommands()); + assertTrue(clientListener.getDisabledEventCommands().containsAll(expectedDisabledCommands)); } /** @@ -542,7 +542,7 @@ public class TcpClientIT { @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 expectedEnabledCommands = Collections.singletonList(CONTEXT_RETRIEVER_NAME_A + ':' + CONTEXT_NAME_A); assertEquals(expectedEnabledCommands, clientListener.getEnabledAppContextCommands()); @@ -561,7 +561,7 @@ public class TcpClientIT { @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 expectedEnabledCommands = Collections.nCopies(2, CONTEXT_RETRIEVER_NAME_A + ':' + CONTEXT_NAME_A);