Repository navigation
[SDKS-120]: Read Only Cluster - #94
Conversation
| self.a_segment_cache.get_registered_segments()) | ||
| self.some_redis.smembers.assert_called_once_with('SPLITIO.segments.registered') | ||
|
|
||
| def test_add_keys_to_segment_adds_keys_to_segment_set(self): |
There was a problem hiding this comment.
i think these test should work, only registere/unregister segment operations are deprecated
There was a problem hiding this comment.
wrong assumption, I will add it again
| 'SPLITIO.segment.some_segment_name', self.some_segment_keys[0], | ||
| self.some_segment_keys[1]) | ||
|
|
||
| def test_remove_keys_from_segment_remove_keys_from_segment_set(self): |
There was a problem hiding this comment.
I'll add it again
| 'SPLITIO.segment.some_segment_name', self.some_segment_keys[0], | ||
| self.some_segment_keys[1]) | ||
|
|
||
| def test_is_in_segment_tests_whether_a_key_is_in_a_segments_key_set(self): |
There was a problem hiding this comment.
I'll add it again
| self.some_redis.sismember.assert_called_once_with( | ||
| 'SPLITIO.segment.some_segment_name', self.some_key) | ||
|
|
||
| def test_set_change_number_sets_segment_change_number_key(self): |
| self.some_redis.set.assert_called_once_with( | ||
| 'SPLITIO.segment.some_segment_name.till', self.some_change_number) | ||
|
|
||
| def test_get_change_number_gets_segment_change_number_key(self): |
| self.some_redis.get.assert_called_once_with( | ||
| 'SPLITIO.segment.some_segment_name.till') | ||
|
|
||
| def test_get_change_number_returns_default_value_if_not_set(self): |
| self.fake_id_not_in_segment, 'test_killed')) | ||
|
|
||
|
|
||
| class LocalhostEnvironmentClientParseSplitFileTests(TestCase, MockUtilsMixin): |
There was a problem hiding this comment.
these tests fail because there's a .split file missing in localhost, for some reason it's not being mocked correctly and it looks for that file on the user's home. This is an old flakey test, not introduced by your code. We can work together to fix this
There was a problem hiding this comment.
mocked thread for these tests
|
@mredolatti code updated regarding the suggestions made |
| RedisSegmentCache._KEY_TEMPLATE.format(suffix='registered'), | ||
| segment_name | ||
| ) | ||
| # self._redis.sadd( |
There was a problem hiding this comment.
If everything works properly and QOS is green, we should remember to remove these lines before the final merge to master/release to pypi and just leave a comment # NOTE: segments needn't be registered/unregistered by the sdk when running in redis consumer mode. These operations are handled by the split-synchronizer (link to the split-sync docs)
| :type segment_name: str | ||
| ''' | ||
| self._redis.srem( | ||
| RedisSegmentCache._KEY_TEMPLATE.format(suffix='registered'), |
SDKS-120: SDK returns control when unable to write the impression back to Redis