You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Did a bunch of cleanup on several connection tests to improve stability and use more recent integration test features.
ClientOnlyConnectionTests reduced the transport connection timeout and increased the timeout helper.
ConnectionApprovalTimeoutTests needed to have the server and client timeout values vary depending upon the test type.
PeerDisconnectCallbackTests needed to trap for the peer disconnecting.
// For these tests we just always place the newly connecting client into pending
73
+
connectionApprovalResponse.Pending=true;
74
+
}
75
+
else
76
+
{
77
+
// We always approve the host
78
+
connectionApprovalResponse.Approved=true;
79
+
}
80
+
}
81
+
82
+
privateconststringk_ExpectedLogWhenServerDoesNotRespond="Timed out waiting for the server to approve the connection request.";
83
+
privateconststringk_ExpectedLogWhenClientDoesNotRequest="Server detected a transport connection from Client-1, but timed out waiting for the connection request message.";
Assert.AreEqual(1,m_ServerNetworkManager.ConnectedClients.Count,$"Expected only one client when there were {m_ServerNetworkManager.ConnectedClients.Count} clients connected!");
98
-
99
-
100
124
Assert.AreEqual(0,m_ServerNetworkManager.ConnectionManager.PendingClients.Count,$"Expected no pending clients when there were {m_ServerNetworkManager.ConnectionManager.PendingClients.Count} pending clients!");
101
125
Assert.True(!m_ClientNetworkManagers[0].LocalClient.IsApproved,$"Expected the client to not have been approved, but it was!");
Assert.IsTrue(client.ConnectedClientsIds.Contains(0ul),$"[Client-{client.LocalClientId}][Connected ({client.IsConnectedClient})] Still has client identifier 0!");
164
-
}
165
178
166
-
for(vari=1ul;i<3ul;++i)
167
-
{
168
-
if(i==disconnectedClient)
169
-
{
170
-
Assert.IsFalse(client.ConnectedClientsIds.Contains(i),$"[Client-{client.LocalClientId}][Connected ({client.IsConnectedClient})] Still has client identifier {i}!");
171
-
}
172
-
else
173
-
{
174
-
Assert.IsTrue(client.ConnectedClientsIds.Contains(i),$"[Client-{client.LocalClientId}][Connected ({client.IsConnectedClient})] Still has client identifier {i}!");
0 commit comments