[asterisk-commits] mjordan: trunk r416299 - in /trunk: ./ tests/test_stasis_endpoints.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Jun 15 16:42:48 CDT 2014


Author: mjordan
Date: Sun Jun 15 16:42:45 2014
New Revision: 416299

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=416299
Log:
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

Modified:
    trunk/   (props changed)
    trunk/tests/test_stasis_endpoints.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: trunk/tests/test_stasis_endpoints.c
URL: http://svnview.digium.com/svn/asterisk/trunk/tests/test_stasis_endpoints.c?view=diff&rev=416299&r1=416298&r2=416299
==============================================================================
--- trunk/tests/test_stasis_endpoints.c (original)
+++ trunk/tests/test_stasis_endpoints.c Sun Jun 15 16:42:45 2014
@@ -239,15 +239,11 @@
 
 	ast_endpoint_add_channel(uut, chan);
 
-	actual_count = stasis_message_sink_wait_for_count(sink, 2,
-		STASIS_SINK_DEFAULT_WAIT);
-	ast_test_validate(test, 2 == actual_count);
+	actual_count = stasis_message_sink_wait_for_count(sink, 1,
+		STASIS_SINK_DEFAULT_WAIT);
+	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);
@@ -256,20 +252,20 @@
 	ast_hangup(chan);
 	chan = NULL;
 
-	actual_count = stasis_message_sink_wait_for_count(sink, 5,
-		STASIS_SINK_DEFAULT_WAIT);
-	ast_test_validate(test, 5 == actual_count);
-
-	msg = sink->messages[2];
+	actual_count = stasis_message_sink_wait_for_count(sink, 4,
+		STASIS_SINK_DEFAULT_WAIT);
+	ast_test_validate(test, 4 == actual_count);
+
+	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);




More information about the asterisk-commits mailing list