changed aiTestCase loop to remove another infinite loop.