Fix a test to avoid races when adding method entry records

Adding method entry records could lead to strange cases when more
methods are executed when adding a record to check for sufficient
capacity in the array list. As more methods are executed when checking
for available capacity we would end up using the available space.

Bug: 206029744
Test: art/testrunner.py -t 988
Change-Id: I9dde44094599f9042195b84327d679d614d75692
2 files changed