Redid how the testcases actually run the client and also changed added a small Thread.sleep to the client's main run loop to prevent cpu overloading