Explorar o código

More realiable tests

Paul-Louis Ageneau %!s(int64=5) %!d(string=hai) anos
pai
achega
738cbe78a0
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      test/capi.cpp
  2. 1 1
      test/connectivity.cpp

+ 1 - 1
test/capi.cpp

@@ -168,7 +168,7 @@ int test_capi_main() {
 	rtcSetMessageCallback(peer1->dc, messageCallback);
 
 	attempts = 10;
-	while (!peer2->connected && attempts--)
+	while (!peer2->connected && !peer1->connected && attempts--)
 		sleep(1);
 
 	if (peer1->state != RTC_CONNECTED || peer2->state != RTC_CONNECTED) {

+ 1 - 1
test/connectivity.cpp

@@ -115,7 +115,7 @@ void test_connectivity() {
 	});
 
 	int attempts = 10;
-	while ((!dc2 || !dc2->isOpen()) && attempts--)
+	while ((!dc2 || !dc2->isOpen() || !dc1->isOpen()) && attempts--)
 		this_thread::sleep_for(1s);
 
 	if (pc1->state() != PeerConnection::State::Connected &&