summaryrefslogtreecommitdiff
path: root/tests/test_stasis_endpoints.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_stasis_endpoints.c')
-rw-r--r--tests/test_stasis_endpoints.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/test_stasis_endpoints.c b/tests/test_stasis_endpoints.c
index c0be07ca8..bc0f57572 100644
--- a/tests/test_stasis_endpoints.c
+++ b/tests/test_stasis_endpoints.c
@@ -264,11 +264,14 @@ AST_TEST_DEFINE(channel_messages)
type = stasis_message_type(msg);
ast_test_validate(test, ast_channel_snapshot_type() == type);
+ /* The ordering of the cache clear and endpoint snapshot are
+ * unspecified */
msg = sink->messages[3];
- type = stasis_message_type(msg);
- ast_test_validate(test, stasis_cache_clear_type() == type);
+ if (stasis_message_type(msg) == stasis_cache_clear_type()) {
+ /* Okay; the next message should be the endpoint snapshot */
+ msg = sink->messages[4];
+ }
- msg = sink->messages[4];
type = stasis_message_type(msg);
ast_test_validate(test, ast_endpoint_snapshot_type() == type);
actual_snapshot = stasis_message_data(msg);