[Asterisk-code-review] sorcery: Add SorceryMemoryCache AMI action tests. (testsuite[master])
Kevin Harwell
asteriskteam at digium.com
Mon Jun 1 17:39:30 CDT 2015
Kevin Harwell has posted comments on this change.
Change subject: sorcery: Add SorceryMemoryCache AMI action tests.
......................................................................
Patch Set 1: Code-Review-1
(2 comments)
https://gerrit.asterisk.org/#/c/544/1/tests/sorcery/memory_cache_stale/test-config.yaml
File tests/sorcery/memory_cache_stale/test-config.yaml:
Line 12: 6. The PJSIPShowEndpoint AMI action is invoked to force a refresh of the object.
: 7. The test waits for 5 seconds for the fresh to occur.
: 6. The PJSIPShowEndpoint AMI action is invoked to confirm the endpoint
: CAN NOT be retrieved as it should not exist in realtime or the cache.'
Instead of waiting some arbitrary amount of time to assume the object doesn't exist anymore I'd rather see (replace or in addition to this) it test for an updated object.
For instance, after adding it to the cache update the backend endpoint with a new value, retrieve the endpoint (should have the cached info), set it to stale, retrieve it again (should now have the updated info).
https://gerrit.asterisk.org/#/c/544/1/tests/sorcery/memory_cache_stale_object/test-config.yaml
File tests/sorcery/memory_cache_stale_object/test-config.yaml:
Line 10: 4. The PJSIP endpoint is removed from realtime.
: 5. The SorceryMemoryCacheStaleObject AMI action is invoked on the memory cache.
: 6. The PJSIPShowEndpoint AMI action is invoked to force a refresh of the object.
: 7. The test waits for 5 seconds for the fresh to occur.
: 6. The PJSIPShowEndpoint AMI action is invoked to confirm the endpoint
: CAN NOT be retrieved as it should not exist in realtime or the cache.'
Similar to the comment on the other stale cache test I think this test should che3ck against an updated object rather than a deleted one (or both scenarios?).
--
To view, visit https://gerrit.asterisk.org/544
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I8fc051a92f52ae4e8e064333138157f28fabfa5f
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list