Skip to content

Commit

Permalink
Fix refill lease-get test for OSS
Browse files Browse the repository at this point in the history
  • Loading branch information
mszabo-wikia committed Nov 18, 2024
1 parent fbd787a commit f1dd094
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mcrouter/test/test_mcrefill.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

from mcrouter.test.config import McrouterGlobals
from mcrouter.test.MCProcess import Memcached
from mcrouter.test.McrouterTestCase import McrouterTestCase

Expand Down Expand Up @@ -65,9 +66,11 @@ def test_basic_leases(self):

def condition():
stat = self.mc1.stats()
# When testing with real memcached,
# this stat is bumped twice because lease-get
# creates a lease token item
return stat["total_items"] == "2"
expected_item_count = "1" if McrouterGlobals.ossVersion() else "2"
return stat["total_items"] == expected_item_count

self.assert_eventually_true(condition)
res = self.mcrouter.leaseGet(key)
Expand Down

0 comments on commit f1dd094

Please sign in to comment.