Skip to content

Commit d35eae2

Browse files
committed
fix(tests): fix for triggered messages tests.
1 parent 56e480c commit d35eae2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

AndroidSDKTests/src/test/java/com/leanplum/_whitebox/MessagesTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,15 @@ public void testSingleMessage() throws Exception {
142142
}
143143

144144
/**
145-
* Testing three messages with no priorities. All three should be called.
145+
* Testing three messages with no priorities. Only one should be called.
146146
*
147147
* @throws Exception
148148
*/
149149
@Test
150150
public void testNoPriorities() throws Exception {
151151
InputStream inputStream = getClass().getResourceAsStream("/test_files/no_priorities.json");
152152
String jsonMessages = IOUtil.toString(inputStream);
153-
Set<String> expectedMessageIds = new HashSet<>(Arrays.asList("1", "2", "3"));
153+
Set<String> expectedMessageIds = new HashSet<>(Arrays.asList("1"));
154154
assertExpectedMessagesAreTriggered(jsonMessages, expectedMessageIds);
155155
}
156156

@@ -185,16 +185,16 @@ public void testDifferentPriorities() throws Exception {
185185
@Test
186186
public void testTiedPriorities() throws Exception {
187187
// Three messages with priorities of 5, no value, and 5.
188-
// The first and the third one should be triggered.
188+
// The first one should be triggered.
189189
InputStream inputStream = getClass().getResourceAsStream("/test_files/tied_priorities_1.json");
190190
String jsonMessages = IOUtil.toString(inputStream);
191-
Set<String> expectedMessageIds = new HashSet<>(Arrays.asList("1", "3"));
191+
Set<String> expectedMessageIds = new HashSet<>(Arrays.asList("1"));
192192
assertExpectedMessagesAreTriggered(jsonMessages, expectedMessageIds);
193193

194-
// Three messages with same priority. All three should be triggered.
194+
// Three messages with same priority. Only one should be triggered.
195195
inputStream = getClass().getResourceAsStream("/test_files/tied_priorities_2.json");
196196
jsonMessages = IOUtil.toString(inputStream);
197-
expectedMessageIds = new HashSet<>(Arrays.asList("1", "2", "3"));
197+
expectedMessageIds = new HashSet<>(Arrays.asList("1"));
198198
assertExpectedMessagesAreTriggered(jsonMessages, expectedMessageIds);
199199
}
200200

0 commit comments

Comments
 (0)