Skip to content

Commit 528b7d4

Browse files
fix to hanging tests
1 parent 0aa265a commit 528b7d4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Assets/Tests/Runtime/HostAndDisconnectTest.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ IEnumerator WaitUntilMainMenuSceneIsLoaded()
4141
// MainMenu is loaded as soon as Startup scene is launched, validate it is loaded
4242
yield return new TestUtilities.WaitForSceneLoad(k_MainMenuSceneName);
4343

44-
yield return new WaitForEndOfFrame();
44+
yield return null;
4545
}
4646

4747
IEnumerator WaitUntilCharacterIsSelectedAndReady(int playerIndex)
4848
{
4949
yield return new TestUtilities.WaitForSceneLoad(k_CharSelectSceneName);
5050

51-
yield return new WaitForEndOfFrame();
51+
yield return null;
5252

5353
// select a Character
5454
var seatObjectName = $"PlayerSeat ({playerIndex})";
@@ -61,7 +61,7 @@ IEnumerator WaitUntilCharacterIsSelectedAndReady(int playerIndex)
6161
uiCharSelectPlayerSeat.OnClicked();
6262

6363
// selecting a class will enable the "Ready" button, next frame it is selectable
64-
yield return new WaitForEndOfFrame();
64+
yield return null;
6565

6666
// hit ready
6767
ClientCharSelectState.Instance.OnPlayerClickedReady();
@@ -128,13 +128,13 @@ public IEnumerator IP_HostAndDisconnect_Valid([ValueSource(nameof(s_PlayerIndice
128128
// select "DIRECT IP" button
129129
clientMainMenuState.OnDirectIPClicked();
130130

131-
yield return new WaitForEndOfFrame();
131+
yield return null;
132132

133133
// select the "HOST" button
134134
ipHostingUI.OnCreateClick();
135135

136136
// confirming hosting will initialize the hosting process; next frame the results will be ready
137-
yield return new WaitForEndOfFrame();
137+
yield return null;
138138

139139
// verify hosting is successful
140140
Assert.That(m_NetworkManager.IsListening && m_NetworkManager.IsHost);

0 commit comments

Comments
 (0)