[Asterisk-code-review] tests/test stasis endpoints: Remove expected duplicate events (asterisk[13])

Matt Jordan asteriskteam at digium.com
Thu Dec 24 20:47:52 CST 2015


Matt Jordan has uploaded a new change for review.

  https://gerrit.asterisk.org/1862

Change subject: tests/test_stasis_endpoints: Remove expected duplicate events
......................................................................

tests/test_stasis_endpoints: Remove expected duplicate events

The cache_clear test was written to expect duplicate Stasis messages
sent from the technology endpoint to the all caching topic. This patch
fixes the test to no longer expect these duplicate messages.

ASTERISK-25137

Change-Id: I58075d70d6cdf42e792e0fb63ba624720bfce981
---
M tests/test_stasis_endpoints.c
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/62/1862/1

diff --git a/tests/test_stasis_endpoints.c b/tests/test_stasis_endpoints.c
index 7ac5291..bc84eb4 100644
--- a/tests/test_stasis_endpoints.c
+++ b/tests/test_stasis_endpoints.c
@@ -167,7 +167,7 @@
 	message_index = stasis_message_sink_wait_for(sink, 0,
 		cache_update, __func__, STASIS_SINK_DEFAULT_WAIT);
 	ast_test_validate(test, 0 <= message_index);
-
+ast_log(LOG_WARNING, "%d\n", message_index);
 	/* First message should be a cache creation entry for our endpoint */
 	msg = sink->messages[message_index];
 	type = stasis_message_type(msg);
@@ -185,8 +185,9 @@
 
 	/* Note: there's a few messages between the creation and the clear.
 	 * Wait for all of them... */
-	message_index = stasis_message_sink_wait_for(sink, message_index + 4,
+	message_index = stasis_message_sink_wait_for(sink, message_index + 2,
 		cache_update, __func__, STASIS_SINK_DEFAULT_WAIT);
+	ast_log(LOG_WARNING, "%d\n", message_index);
 	ast_test_validate(test, 0 <= message_index);
 	/* Now we should have a cache removal entry */
 	msg = sink->messages[message_index];

-- 
To view, visit https://gerrit.asterisk.org/1862
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I58075d70d6cdf42e792e0fb63ba624720bfce981
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Matt Jordan <mjordan at digium.com>



More information about the asterisk-code-review mailing list