[asterisk-commits] dlee: branch dlee/stasis-forward-optimization r399664 - /team/dlee/stasis-for...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Sep 24 12:44:06 CDT 2013
Author: dlee
Date: Tue Sep 24 12:44:04 2013
New Revision: 399664
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399664
Log:
Fix endpoint test for unspecified message order
Modified:
team/dlee/stasis-forward-optimization/tests/test_stasis_endpoints.c
Modified: team/dlee/stasis-forward-optimization/tests/test_stasis_endpoints.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-forward-optimization/tests/test_stasis_endpoints.c?view=diff&rev=399664&r1=399663&r2=399664
==============================================================================
--- team/dlee/stasis-forward-optimization/tests/test_stasis_endpoints.c (original)
+++ team/dlee/stasis-forward-optimization/tests/test_stasis_endpoints.c Tue Sep 24 12:44:04 2013
@@ -264,11 +264,14 @@
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);
-
- msg = sink->messages[4];
+ if (stasis_message_type(msg) == stasis_cache_clear_type()) {
+ /* Okay; the next message should be the endpoint snapshot */
+ msg = sink->messages[4];
+ }
+
type = stasis_message_type(msg);
ast_test_validate(test, ast_endpoint_snapshot_type() == type);
actual_snapshot = stasis_message_data(msg);
More information about the asterisk-commits
mailing list