Skip to content

Commit

Permalink
improving logging in GetLobbyInstancesWithPingData test, bailing out …
Browse files Browse the repository at this point in the history
…early if pingRegions fails
  • Loading branch information
jo-codegirl committed Feb 7, 2024
1 parent 43e9860 commit 37501da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion tests/src/TestBCLobby.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,16 @@ TEST_F(TestBCLobby, GetLobbyInstancesWithPingData)
// Fetch pings
m_bc->getLobbyService()->getRegionsForLobbies({ "MATCH_UNRANKED" }, & tr);
tr.run(m_bc);

m_bc->getLobbyService()->pingRegions(&tr);
tr.run(m_bc);

if(!tr.m_result){
// ping error
GTEST_FATAL_FAILURE_("test failure with pingRegions - bailing out before completion\n");
return;
}

m_bc->getLobbyService()->getLobbyInstancesWithPingData("MATCH_UNRANKED", "{\"rating\":{\"min\":1,\"max\":1000},\"ping\":{\"max\":100}}", &tr);
tr.run(m_bc);
}
2 changes: 1 addition & 1 deletion tests/src/TestResult.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ bool TestResult::runExpectCount(BrainCloudClient * in_bc, int in_apiCountExpecte
if (!m_done)
{
// we timed out so try to reset the comms and throw the error
if (!in_noAssert) EXPECT_TRUE(m_done);
in_bc->resetCommunication();
m_result = false;
m_statusCode = 999;
m_reasonCode = 999;
m_statusMessage = "TEST TIMEOUT EXCEEDED";
if (!in_noAssert) EXPECT_TRUE(m_done);
}
else
{
Expand Down

0 comments on commit 37501da

Please sign in to comment.