some MySQL-env element is causing memory growth that goes very
far before stopping
Change-Id: Ic0882dd78636067980fceba4e3a969de78d5b26a
max_ = 0
max_grew_for = 0
success = False
- for y in range(maxtimes // 5):
+ until_maxtimes = 0
+ while True:
+ if until_maxtimes >= maxtimes // 5:
+ break
for x in range(5):
func(*args)
gc_collect()
)
max_ = latest_max
max_grew_for += 1
+ until_maxtimes += 1
continue
else:
print("Max remained at %s, %s more attempts left" %
if max_grew_for == 0:
success = True
break
- else:
- assert False, repr(samples)
+
+ if not success:
+ assert False, \
+ "Ran for a total of %d times, memory kept growing: %r" % (
+ maxtimes,
+ samples
+ )
assert success
return profile