summaryrefslogtreecommitdiff
path: root/tests/test_stasis_endpoints.c
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2014-06-15 21:42:45 +0000
committerMatthew Jordan <mjordan@digium.com>2014-06-15 21:42:45 +0000
commit705d0c3e819ae6c41b81f3776ad21f524396d17b (patch)
treef1a6dcc81a2cd822d5f9ad1aeb2523826c5d57ce /tests/test_stasis_endpoints.c
parentb52c6d09033335264bcdbe2230b15b5aff5ac54e (diff)
test_stasis_endpoints: Remove expected channel snapshot
We no longer publish a channel snapshot when it is associated with an endpoint; after all, the channel itself hasn't changed - the endpoint state has changed. This updates the channel_messages unit test accordingly. ........ Merged revisions 416298 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'tests/test_stasis_endpoints.c')
-rw-r--r--tests/test_stasis_endpoints.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/tests/test_stasis_endpoints.c b/tests/test_stasis_endpoints.c
index e17a79e14..85d4afd17 100644
--- a/tests/test_stasis_endpoints.c
+++ b/tests/test_stasis_endpoints.c
@@ -239,16 +239,12 @@ AST_TEST_DEFINE(channel_messages)
ast_endpoint_add_channel(uut, chan);
- actual_count = stasis_message_sink_wait_for_count(sink, 2,
+ actual_count = stasis_message_sink_wait_for_count(sink, 1,
STASIS_SINK_DEFAULT_WAIT);
- ast_test_validate(test, 2 == actual_count);
+ ast_test_validate(test, 1 == actual_count);
msg = sink->messages[0];
type = stasis_message_type(msg);
- ast_test_validate(test, ast_channel_snapshot_type() == type);
-
- msg = sink->messages[1];
- type = stasis_message_type(msg);
ast_test_validate(test, ast_endpoint_snapshot_type() == type);
actual_snapshot = stasis_message_data(msg);
ast_test_validate(test, 1 == actual_snapshot->num_channels);
@@ -256,20 +252,20 @@ AST_TEST_DEFINE(channel_messages)
ast_hangup(chan);
chan = NULL;
- actual_count = stasis_message_sink_wait_for_count(sink, 5,
+ actual_count = stasis_message_sink_wait_for_count(sink, 4,
STASIS_SINK_DEFAULT_WAIT);
- ast_test_validate(test, 5 == actual_count);
+ ast_test_validate(test, 4 == actual_count);
- msg = sink->messages[2];
+ msg = sink->messages[1];
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];
+ msg = sink->messages[2];
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[3];
}
type = stasis_message_type(msg);