Skip to content

Commit

Permalink
CBQE-5616: Fix test hang when interestingStats are 0 but storageTotal…
Browse files Browse the repository at this point in the history
…s are ok

Change-Id: I5eee4be4658229b2ce69608f967d4e0cbd9a08fa
Reviewed-on: http://review.couchbase.org/c/testrunner/+/125294
Reviewed-by: Balakumaran G <balakumaran.gopal@couchbase.com>
Tested-by: Jagadesh Munta <jagadesh.munta@couchbase.com>
Reviewed-on: http://review.couchbase.org/c/testrunner/+/125528
  • Loading branch information
jdmuntacb committed Apr 11, 2020
1 parent 2d2ec65 commit 63eac42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/membase/api/rest_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5132,6 +5132,8 @@ def parse_get_nodes_response(self, parsed):
if storageTotals["ram"].get("total"):
ramKB = storageTotals["ram"]["total"]
node.storageTotalRam = ramKB/(1024*1024)
if node.mcdMemoryReserved == 0:
node.mcdMemoryReserved = node.storageTotalRam

if IS_CONTAINER:
# the storage total values are more accurate than
Expand Down
5 changes: 3 additions & 2 deletions lib/tasks/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,12 @@ def execute(self, task_manager):
self.state = FINISHED
self.set_exception(error)
return
self.log.info("server: %s, nodes/self ", self.server)
info = Future.wait_until(lambda: rest.get_nodes_self(),
lambda x: x.memoryTotal > 0,
lambda x: x.memoryTotal > 0 or x.storageTotalRam > 0,
timeout_secs=60, interval_time=0.1,
exponential_backoff=False)
self.log.info("server: %s, nodes/self: %s", self.server, info.__dict__)
self.log.info(" %s", info.__dict__)

username = self.server.rest_username
password = self.server.rest_password
Expand Down

0 comments on commit 63eac42

Please sign in to comment.