Update test cases to perform network communication off the main thread