[asterisk-commits] res sorcery memory cache: Execute stale unit test last. (asterisk[certified/13.1])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 8 17:20:43 CDT 2015


Joshua Colp has submitted this change and it was merged.

Change subject: res_sorcery_memory_cache: Execute stale unit test last.
......................................................................


res_sorcery_memory_cache: Execute stale unit test last.

In Jenkins there is currently a sporadic test failure of a
variable number of sorcery memory cache unit tests. I have not
been able to reproduce this on the build agents themselves or
on my development machine.

My working theory is that the stale unit test is causing a
sorcery instance to persist longer than expected, causing subsequent
tests to fail when setting up and initializing the next
sorcery instance.

To see if this is the case this change moves the stale unit test
to execute last so no subsequent unit tests can have issues
initializing their sorcery instance.

Change-Id: Ifd6550a949613be774b75fa5db12c02110f82c4a
---
M res/res_sorcery_memory_cache.c
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Kevin Harwell: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Verified



diff --git a/res/res_sorcery_memory_cache.c b/res/res_sorcery_memory_cache.c
index dae7606..d5559f5 100644
--- a/res/res_sorcery_memory_cache.c
+++ b/res/res_sorcery_memory_cache.c
@@ -2551,6 +2551,10 @@
 		return AST_MODULE_LOAD_DECLINE;
 	}
 
+	/* This causes the stale unit test to execute last, so if a sorcery instance persists
+	 * longer than expected subsequent unit tests don't fail when setting it up.
+	 */
+	AST_TEST_REGISTER(stale);
 	AST_TEST_REGISTER(open_with_valid_options);
 	AST_TEST_REGISTER(open_with_invalid_options);
 	AST_TEST_REGISTER(create_and_retrieve);
@@ -2558,7 +2562,6 @@
 	AST_TEST_REGISTER(delete);
 	AST_TEST_REGISTER(maximum_objects);
 	AST_TEST_REGISTER(expiration);
-	AST_TEST_REGISTER(stale);
 
 	return AST_MODULE_LOAD_SUCCESS;
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd6550a949613be774b75fa5db12c02110f82c4a
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: certified/13.1
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>



More information about the asterisk-commits mailing list