[asterisk-commits] mjordan: branch 12 r398628 - /branches/12/tests/test_cdr.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Sep 8 18:25:58 CDT 2013


Author: mjordan
Date: Sun Sep  8 18:25:55 2013
New Revision: 398628

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=398628
Log:
Update CDR Unit tests to reflect container changes in r398579

When a channel joins a multi-party bridge, the ordering of the CDRs that is
created is determined by the ordering of the channels who happen to be in that
bridge. When r398579 changed the number of buckets in the container to
something sensible, it changed the ordering that the CDRs was created in,
causing one of the multiparty tests to fail. This fixes the test with the
now expected ordering.

Modified:
    branches/12/tests/test_cdr.c

Modified: branches/12/tests/test_cdr.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/tests/test_cdr.c?view=diff&rev=398628&r1=398627&r2=398628
==============================================================================
--- branches/12/tests/test_cdr.c (original)
+++ branches/12/tests/test_cdr.c Sun Sep  8 18:25:55 2013
@@ -1808,6 +1808,22 @@
 		.dst = "100",
 		.dcontext = "default",
 		.channel = CHANNEL_TECH_NAME "/Alice",
+		.dstchannel = CHANNEL_TECH_NAME "/Charlie",
+		.lastapp = "Dial",
+		.lastdata = CHANNEL_TECH_NAME "/Bob",
+		.amaflags = AST_AMA_DOCUMENTATION,
+		.billsec = 1,
+		.disposition = AST_CDR_ANSWERED,
+		.accountcode = "100",
+		.peeraccount = "300",
+		.next = &charlie_expected_one,
+	};
+	struct ast_cdr alice_expected_two = {
+		.clid = "\"Alice\" <100>",
+		.src = "100",
+		.dst = "100",
+		.dcontext = "default",
+		.channel = CHANNEL_TECH_NAME "/Alice",
 		.dstchannel = CHANNEL_TECH_NAME "/David",
 		.lastapp = "Dial",
 		.lastdata = CHANNEL_TECH_NAME "/Bob",
@@ -1816,22 +1832,6 @@
 		.disposition = AST_CDR_ANSWERED,
 		.accountcode = "100",
 		.peeraccount = "400",
-		.next = &charlie_expected_one,
-	};
-	struct ast_cdr alice_expected_two = {
-		.clid = "\"Alice\" <100>",
-		.src = "100",
-		.dst = "100",
-		.dcontext = "default",
-		.channel = CHANNEL_TECH_NAME "/Alice",
-		.dstchannel = CHANNEL_TECH_NAME "/Charlie",
-		.lastapp = "Dial",
-		.lastdata = CHANNEL_TECH_NAME "/Bob",
-		.amaflags = AST_AMA_DOCUMENTATION,
-		.billsec = 1,
-		.disposition = AST_CDR_ANSWERED,
-		.accountcode = "100",
-		.peeraccount = "300",
 		.next = &alice_expected_three,
 	};
 	struct ast_cdr alice_expected_one = {




More information about the asterisk-commits mailing list