|
|
|
@ -11,8 +11,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
#include <AzCore/Interface/Interface.h>
|
|
|
|
#include <AzCore/Interface/Interface.h>
|
|
|
|
#include <AzFramework/IO/LocalFileIO.h>
|
|
|
|
#include <AzFramework/IO/LocalFileIO.h>
|
|
|
|
#include <AzFramework/Session/SessionConfig.h>
|
|
|
|
#include <Multiplayer/Session/SessionConfig.h>
|
|
|
|
#include <AzFramework/Session/SessionNotifications.h>
|
|
|
|
#include <Multiplayer/Session/SessionNotifications.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace UnitTest
|
|
|
|
namespace UnitTest
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -154,25 +154,25 @@ R"({
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class SessionNotificationsHandlerMock
|
|
|
|
class SessionNotificationsHandlerMock
|
|
|
|
: public AzFramework::SessionNotificationBus::Handler
|
|
|
|
: public Multiplayer::SessionNotificationBus::Handler
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
SessionNotificationsHandlerMock()
|
|
|
|
SessionNotificationsHandlerMock()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AzFramework::SessionNotificationBus::Handler::BusConnect();
|
|
|
|
Multiplayer::SessionNotificationBus::Handler::BusConnect();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
~SessionNotificationsHandlerMock()
|
|
|
|
~SessionNotificationsHandlerMock()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AzFramework::SessionNotificationBus::Handler::BusDisconnect();
|
|
|
|
Multiplayer::SessionNotificationBus::Handler::BusDisconnect();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
MOCK_METHOD0(OnSessionHealthCheck, bool());
|
|
|
|
MOCK_METHOD0(OnSessionHealthCheck, bool());
|
|
|
|
MOCK_METHOD1(OnCreateSessionBegin, bool(const AzFramework::SessionConfig&));
|
|
|
|
MOCK_METHOD1(OnCreateSessionBegin, bool(const Multiplayer::SessionConfig&));
|
|
|
|
MOCK_METHOD0(OnCreateSessionEnd, void());
|
|
|
|
MOCK_METHOD0(OnCreateSessionEnd, void());
|
|
|
|
MOCK_METHOD0(OnDestroySessionBegin, bool());
|
|
|
|
MOCK_METHOD0(OnDestroySessionBegin, bool());
|
|
|
|
MOCK_METHOD0(OnDestroySessionEnd, void());
|
|
|
|
MOCK_METHOD0(OnDestroySessionEnd, void());
|
|
|
|
MOCK_METHOD2(OnUpdateSessionBegin, void(const AzFramework::SessionConfig&, const AZStd::string&));
|
|
|
|
MOCK_METHOD2(OnUpdateSessionBegin, void(const Multiplayer::SessionConfig&, const AZStd::string&));
|
|
|
|
MOCK_METHOD0(OnUpdateSessionEnd, void());
|
|
|
|
MOCK_METHOD0(OnUpdateSessionEnd, void());
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
@ -255,9 +255,9 @@ R"({
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_serverManager->InitializeGameLiftServerSDK();
|
|
|
|
m_serverManager->InitializeGameLiftServerSDK();
|
|
|
|
m_serverManager->NotifyGameLiftProcessReady();
|
|
|
|
m_serverManager->NotifyGameLiftProcessReady();
|
|
|
|
if (!AZ::Interface<AzFramework::ISessionHandlingProviderRequests>::Get())
|
|
|
|
if (!AZ::Interface<Multiplayer::ISessionHandlingProviderRequests>::Get())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AZ::Interface<AzFramework::ISessionHandlingProviderRequests>::Register(m_serverManager.get());
|
|
|
|
AZ::Interface<Multiplayer::ISessionHandlingProviderRequests>::Register(m_serverManager.get());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
SessionNotificationsHandlerMock handlerMock;
|
|
|
|
SessionNotificationsHandlerMock handlerMock;
|
|
|
|
@ -270,16 +270,16 @@ R"({
|
|
|
|
m_serverManager->m_gameLiftServerSDKWrapperMockPtr->m_onProcessTerminateFunc();
|
|
|
|
m_serverManager->m_gameLiftServerSDKWrapperMockPtr->m_onProcessTerminateFunc();
|
|
|
|
AZ_TEST_STOP_TRACE_SUPPRESSION(1);
|
|
|
|
AZ_TEST_STOP_TRACE_SUPPRESSION(1);
|
|
|
|
|
|
|
|
|
|
|
|
EXPECT_FALSE(AZ::Interface<AzFramework::ISessionHandlingProviderRequests>::Get());
|
|
|
|
EXPECT_FALSE(AZ::Interface<Multiplayer::ISessionHandlingProviderRequests>::Get());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TEST_F(GameLiftServerManagerTest, OnProcessTerminate_OnDestroySessionBeginReturnsTrue_TerminationNotificationSent)
|
|
|
|
TEST_F(GameLiftServerManagerTest, OnProcessTerminate_OnDestroySessionBeginReturnsTrue_TerminationNotificationSent)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_serverManager->InitializeGameLiftServerSDK();
|
|
|
|
m_serverManager->InitializeGameLiftServerSDK();
|
|
|
|
m_serverManager->NotifyGameLiftProcessReady();
|
|
|
|
m_serverManager->NotifyGameLiftProcessReady();
|
|
|
|
if (!AZ::Interface<AzFramework::ISessionHandlingProviderRequests>::Get())
|
|
|
|
if (!AZ::Interface<Multiplayer::ISessionHandlingProviderRequests>::Get())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AZ::Interface<AzFramework::ISessionHandlingProviderRequests>::Register(m_serverManager.get());
|
|
|
|
AZ::Interface<Multiplayer::ISessionHandlingProviderRequests>::Register(m_serverManager.get());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
SessionNotificationsHandlerMock handlerMock;
|
|
|
|
SessionNotificationsHandlerMock handlerMock;
|
|
|
|
@ -292,16 +292,16 @@ R"({
|
|
|
|
|
|
|
|
|
|
|
|
m_serverManager->m_gameLiftServerSDKWrapperMockPtr->m_onProcessTerminateFunc();
|
|
|
|
m_serverManager->m_gameLiftServerSDKWrapperMockPtr->m_onProcessTerminateFunc();
|
|
|
|
|
|
|
|
|
|
|
|
EXPECT_FALSE(AZ::Interface<AzFramework::ISessionHandlingProviderRequests>::Get());
|
|
|
|
EXPECT_FALSE(AZ::Interface<Multiplayer::ISessionHandlingProviderRequests>::Get());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TEST_F(GameLiftServerManagerTest, OnProcessTerminate_OnDestroySessionBeginReturnsTrue_TerminationNotificationSentButFail)
|
|
|
|
TEST_F(GameLiftServerManagerTest, OnProcessTerminate_OnDestroySessionBeginReturnsTrue_TerminationNotificationSentButFail)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_serverManager->InitializeGameLiftServerSDK();
|
|
|
|
m_serverManager->InitializeGameLiftServerSDK();
|
|
|
|
m_serverManager->NotifyGameLiftProcessReady();
|
|
|
|
m_serverManager->NotifyGameLiftProcessReady();
|
|
|
|
if (!AZ::Interface<AzFramework::ISessionHandlingProviderRequests>::Get())
|
|
|
|
if (!AZ::Interface<Multiplayer::ISessionHandlingProviderRequests>::Get())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AZ::Interface<AzFramework::ISessionHandlingProviderRequests>::Register(m_serverManager.get());
|
|
|
|
AZ::Interface<Multiplayer::ISessionHandlingProviderRequests>::Register(m_serverManager.get());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
SessionNotificationsHandlerMock handlerMock;
|
|
|
|
SessionNotificationsHandlerMock handlerMock;
|
|
|
|
@ -316,7 +316,7 @@ R"({
|
|
|
|
m_serverManager->m_gameLiftServerSDKWrapperMockPtr->m_onProcessTerminateFunc();
|
|
|
|
m_serverManager->m_gameLiftServerSDKWrapperMockPtr->m_onProcessTerminateFunc();
|
|
|
|
AZ_TEST_STOP_TRACE_SUPPRESSION(1);
|
|
|
|
AZ_TEST_STOP_TRACE_SUPPRESSION(1);
|
|
|
|
|
|
|
|
|
|
|
|
EXPECT_FALSE(AZ::Interface<AzFramework::ISessionHandlingProviderRequests>::Get());
|
|
|
|
EXPECT_FALSE(AZ::Interface<Multiplayer::ISessionHandlingProviderRequests>::Get());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TEST_F(GameLiftServerManagerTest, OnHealthCheck_OnSessionHealthCheckReturnsTrue_CallbackFunctionReturnsTrue)
|
|
|
|
TEST_F(GameLiftServerManagerTest, OnHealthCheck_OnSessionHealthCheckReturnsTrue_CallbackFunctionReturnsTrue)
|
|
|
|
@ -379,7 +379,7 @@ R"({
|
|
|
|
testProperty.SetValue("testValue");
|
|
|
|
testProperty.SetValue("testValue");
|
|
|
|
testSession.AddGameProperties(testProperty);
|
|
|
|
testSession.AddGameProperties(testProperty);
|
|
|
|
m_serverManager->m_gameLiftServerSDKWrapperMockPtr->m_onStartGameSessionFunc(testSession);
|
|
|
|
m_serverManager->m_gameLiftServerSDKWrapperMockPtr->m_onStartGameSessionFunc(testSession);
|
|
|
|
EXPECT_TRUE(AZ::Interface<AzFramework::ISessionHandlingProviderRequests>::Get());
|
|
|
|
EXPECT_TRUE(AZ::Interface<Multiplayer::ISessionHandlingProviderRequests>::Get());
|
|
|
|
m_serverManager->HandleDestroySession();
|
|
|
|
m_serverManager->HandleDestroySession();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -465,14 +465,14 @@ R"({
|
|
|
|
TEST_F(GameLiftServerManagerTest, ValidatePlayerJoinSession_CallWithInvalidConnectionConfig_GetFalseResultAndExpectedErrorLog)
|
|
|
|
TEST_F(GameLiftServerManagerTest, ValidatePlayerJoinSession_CallWithInvalidConnectionConfig_GetFalseResultAndExpectedErrorLog)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AZ_TEST_START_TRACE_SUPPRESSION;
|
|
|
|
AZ_TEST_START_TRACE_SUPPRESSION;
|
|
|
|
auto result = m_serverManager->ValidatePlayerJoinSession(AzFramework::PlayerConnectionConfig());
|
|
|
|
auto result = m_serverManager->ValidatePlayerJoinSession(Multiplayer::PlayerConnectionConfig());
|
|
|
|
AZ_TEST_STOP_TRACE_SUPPRESSION(1);
|
|
|
|
AZ_TEST_STOP_TRACE_SUPPRESSION(1);
|
|
|
|
EXPECT_FALSE(result);
|
|
|
|
EXPECT_FALSE(result);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TEST_F(GameLiftServerManagerTest, ValidatePlayerJoinSession_CallWithDuplicatedConnectionId_GetFalseResultAndExpectedErrorLog)
|
|
|
|
TEST_F(GameLiftServerManagerTest, ValidatePlayerJoinSession_CallWithDuplicatedConnectionId_GetFalseResultAndExpectedErrorLog)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AzFramework::PlayerConnectionConfig connectionConfig1;
|
|
|
|
Multiplayer::PlayerConnectionConfig connectionConfig1;
|
|
|
|
connectionConfig1.m_playerConnectionId = 123;
|
|
|
|
connectionConfig1.m_playerConnectionId = 123;
|
|
|
|
connectionConfig1.m_playerSessionId = "dummyPlayerSessionId1";
|
|
|
|
connectionConfig1.m_playerSessionId = "dummyPlayerSessionId1";
|
|
|
|
GenericOutcome successOutcome(nullptr);
|
|
|
|
GenericOutcome successOutcome(nullptr);
|
|
|
|
@ -480,7 +480,7 @@ R"({
|
|
|
|
.Times(1)
|
|
|
|
.Times(1)
|
|
|
|
.WillOnce(Return(successOutcome));
|
|
|
|
.WillOnce(Return(successOutcome));
|
|
|
|
m_serverManager->ValidatePlayerJoinSession(connectionConfig1);
|
|
|
|
m_serverManager->ValidatePlayerJoinSession(connectionConfig1);
|
|
|
|
AzFramework::PlayerConnectionConfig connectionConfig2;
|
|
|
|
Multiplayer::PlayerConnectionConfig connectionConfig2;
|
|
|
|
connectionConfig2.m_playerConnectionId = 123;
|
|
|
|
connectionConfig2.m_playerConnectionId = 123;
|
|
|
|
connectionConfig2.m_playerSessionId = "dummyPlayerSessionId2";
|
|
|
|
connectionConfig2.m_playerSessionId = "dummyPlayerSessionId2";
|
|
|
|
AZ_TEST_START_TRACE_SUPPRESSION;
|
|
|
|
AZ_TEST_START_TRACE_SUPPRESSION;
|
|
|
|
@ -491,7 +491,7 @@ R"({
|
|
|
|
|
|
|
|
|
|
|
|
TEST_F(GameLiftServerManagerTest, ValidatePlayerJoinSession_CallWithValidConnectionConfigButErrorOutcome_GetFalseResultAndExpectedErrorLog)
|
|
|
|
TEST_F(GameLiftServerManagerTest, ValidatePlayerJoinSession_CallWithValidConnectionConfigButErrorOutcome_GetFalseResultAndExpectedErrorLog)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AzFramework::PlayerConnectionConfig connectionConfig;
|
|
|
|
Multiplayer::PlayerConnectionConfig connectionConfig;
|
|
|
|
connectionConfig.m_playerConnectionId = 123;
|
|
|
|
connectionConfig.m_playerConnectionId = 123;
|
|
|
|
connectionConfig.m_playerSessionId = "dummyPlayerSessionId1";
|
|
|
|
connectionConfig.m_playerSessionId = "dummyPlayerSessionId1";
|
|
|
|
EXPECT_CALL(*(m_serverManager->m_gameLiftServerSDKWrapperMockPtr), AcceptPlayerSession(testing::_)).Times(1);
|
|
|
|
EXPECT_CALL(*(m_serverManager->m_gameLiftServerSDKWrapperMockPtr), AcceptPlayerSession(testing::_)).Times(1);
|
|
|
|
@ -503,7 +503,7 @@ R"({
|
|
|
|
|
|
|
|
|
|
|
|
TEST_F(GameLiftServerManagerTest, ValidatePlayerJoinSession_CallWithValidConnectionConfigAndSuccessOutcome_GetTrueResult)
|
|
|
|
TEST_F(GameLiftServerManagerTest, ValidatePlayerJoinSession_CallWithValidConnectionConfigAndSuccessOutcome_GetTrueResult)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AzFramework::PlayerConnectionConfig connectionConfig;
|
|
|
|
Multiplayer::PlayerConnectionConfig connectionConfig;
|
|
|
|
connectionConfig.m_playerConnectionId = 123;
|
|
|
|
connectionConfig.m_playerConnectionId = 123;
|
|
|
|
connectionConfig.m_playerSessionId = "dummyPlayerSessionId1";
|
|
|
|
connectionConfig.m_playerSessionId = "dummyPlayerSessionId1";
|
|
|
|
GenericOutcome successOutcome(nullptr);
|
|
|
|
GenericOutcome successOutcome(nullptr);
|
|
|
|
@ -516,7 +516,7 @@ R"({
|
|
|
|
|
|
|
|
|
|
|
|
TEST_F(GameLiftServerManagerTest, ValidatePlayerJoinSession_CallWithFirstErrorSecondSuccess_GetFirstFalseSecondTrueResult)
|
|
|
|
TEST_F(GameLiftServerManagerTest, ValidatePlayerJoinSession_CallWithFirstErrorSecondSuccess_GetFirstFalseSecondTrueResult)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AzFramework::PlayerConnectionConfig connectionConfig1;
|
|
|
|
Multiplayer::PlayerConnectionConfig connectionConfig1;
|
|
|
|
connectionConfig1.m_playerConnectionId = 123;
|
|
|
|
connectionConfig1.m_playerConnectionId = 123;
|
|
|
|
connectionConfig1.m_playerSessionId = "dummyPlayerSessionId1";
|
|
|
|
connectionConfig1.m_playerSessionId = "dummyPlayerSessionId1";
|
|
|
|
GenericOutcome successOutcome(nullptr);
|
|
|
|
GenericOutcome successOutcome(nullptr);
|
|
|
|
@ -530,7 +530,7 @@ R"({
|
|
|
|
auto result = m_serverManager->ValidatePlayerJoinSession(connectionConfig1);
|
|
|
|
auto result = m_serverManager->ValidatePlayerJoinSession(connectionConfig1);
|
|
|
|
AZ_TEST_STOP_TRACE_SUPPRESSION(1);
|
|
|
|
AZ_TEST_STOP_TRACE_SUPPRESSION(1);
|
|
|
|
EXPECT_FALSE(result);
|
|
|
|
EXPECT_FALSE(result);
|
|
|
|
AzFramework::PlayerConnectionConfig connectionConfig2;
|
|
|
|
Multiplayer::PlayerConnectionConfig connectionConfig2;
|
|
|
|
connectionConfig2.m_playerConnectionId = 123;
|
|
|
|
connectionConfig2.m_playerConnectionId = 123;
|
|
|
|
connectionConfig2.m_playerSessionId = "dummyPlayerSessionId2";
|
|
|
|
connectionConfig2.m_playerSessionId = "dummyPlayerSessionId2";
|
|
|
|
result = m_serverManager->ValidatePlayerJoinSession(connectionConfig2);
|
|
|
|
result = m_serverManager->ValidatePlayerJoinSession(connectionConfig2);
|
|
|
|
@ -549,7 +549,7 @@ R"({
|
|
|
|
for (int index = 0; index < testThreadNumber; index++)
|
|
|
|
for (int index = 0; index < testThreadNumber; index++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
testThreadPool.emplace_back(AZStd::thread([&]() {
|
|
|
|
testThreadPool.emplace_back(AZStd::thread([&]() {
|
|
|
|
AzFramework::PlayerConnectionConfig connectionConfig;
|
|
|
|
Multiplayer::PlayerConnectionConfig connectionConfig;
|
|
|
|
connectionConfig.m_playerConnectionId = 123;
|
|
|
|
connectionConfig.m_playerConnectionId = 123;
|
|
|
|
connectionConfig.m_playerSessionId = "dummyPlayerSessionId";
|
|
|
|
connectionConfig.m_playerSessionId = "dummyPlayerSessionId";
|
|
|
|
auto result = m_serverManager->ValidatePlayerJoinSession(connectionConfig);
|
|
|
|
auto result = m_serverManager->ValidatePlayerJoinSession(connectionConfig);
|
|
|
|
@ -571,19 +571,19 @@ R"({
|
|
|
|
EXPECT_CALL(*(m_serverManager->m_gameLiftServerSDKWrapperMockPtr), RemovePlayerSession(testing::_)).Times(0);
|
|
|
|
EXPECT_CALL(*(m_serverManager->m_gameLiftServerSDKWrapperMockPtr), RemovePlayerSession(testing::_)).Times(0);
|
|
|
|
|
|
|
|
|
|
|
|
AZ_TEST_START_TRACE_SUPPRESSION;
|
|
|
|
AZ_TEST_START_TRACE_SUPPRESSION;
|
|
|
|
m_serverManager->HandlePlayerLeaveSession(AzFramework::PlayerConnectionConfig());
|
|
|
|
m_serverManager->HandlePlayerLeaveSession(Multiplayer::PlayerConnectionConfig());
|
|
|
|
AZ_TEST_STOP_TRACE_SUPPRESSION(1);
|
|
|
|
AZ_TEST_STOP_TRACE_SUPPRESSION(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TEST_F(GameLiftServerManagerTest, HandlePlayerLeaveSession_CallWithNonExistentPlayerConnectionId_GetExpectedErrorLog)
|
|
|
|
TEST_F(GameLiftServerManagerTest, HandlePlayerLeaveSession_CallWithNonExistentPlayerConnectionId_GetExpectedErrorLog)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AzFramework::PlayerConnectionConfig connectionConfig;
|
|
|
|
Multiplayer::PlayerConnectionConfig connectionConfig;
|
|
|
|
connectionConfig.m_playerConnectionId = 123;
|
|
|
|
connectionConfig.m_playerConnectionId = 123;
|
|
|
|
connectionConfig.m_playerSessionId = "dummyPlayerSessionId";
|
|
|
|
connectionConfig.m_playerSessionId = "dummyPlayerSessionId";
|
|
|
|
auto result = m_serverManager->AddConnectedTestPlayer(connectionConfig);
|
|
|
|
auto result = m_serverManager->AddConnectedTestPlayer(connectionConfig);
|
|
|
|
EXPECT_TRUE(result);
|
|
|
|
EXPECT_TRUE(result);
|
|
|
|
|
|
|
|
|
|
|
|
AzFramework::PlayerConnectionConfig connectionConfig1;
|
|
|
|
Multiplayer::PlayerConnectionConfig connectionConfig1;
|
|
|
|
connectionConfig1.m_playerConnectionId = 456;
|
|
|
|
connectionConfig1.m_playerConnectionId = 456;
|
|
|
|
connectionConfig1.m_playerSessionId = "dummyPlayerSessionId";
|
|
|
|
connectionConfig1.m_playerSessionId = "dummyPlayerSessionId";
|
|
|
|
|
|
|
|
|
|
|
|
@ -596,7 +596,7 @@ R"({
|
|
|
|
|
|
|
|
|
|
|
|
TEST_F(GameLiftServerManagerTest, HandlePlayerLeaveSession_CallWithValidConnectionConfigButErrorOutcome_GetExpectedErrorLog)
|
|
|
|
TEST_F(GameLiftServerManagerTest, HandlePlayerLeaveSession_CallWithValidConnectionConfigButErrorOutcome_GetExpectedErrorLog)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AzFramework::PlayerConnectionConfig connectionConfig;
|
|
|
|
Multiplayer::PlayerConnectionConfig connectionConfig;
|
|
|
|
connectionConfig.m_playerConnectionId = 123;
|
|
|
|
connectionConfig.m_playerConnectionId = 123;
|
|
|
|
connectionConfig.m_playerSessionId = "dummyPlayerSessionId";
|
|
|
|
connectionConfig.m_playerSessionId = "dummyPlayerSessionId";
|
|
|
|
auto result = m_serverManager->AddConnectedTestPlayer(connectionConfig);
|
|
|
|
auto result = m_serverManager->AddConnectedTestPlayer(connectionConfig);
|
|
|
|
@ -615,7 +615,7 @@ R"({
|
|
|
|
|
|
|
|
|
|
|
|
TEST_F(GameLiftServerManagerTest, HandlePlayerLeaveSession_CallWithValidConnectionConfigAndSuccessOutcome_RemovePlayerSessionNotificationSent)
|
|
|
|
TEST_F(GameLiftServerManagerTest, HandlePlayerLeaveSession_CallWithValidConnectionConfigAndSuccessOutcome_RemovePlayerSessionNotificationSent)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AzFramework::PlayerConnectionConfig connectionConfig;
|
|
|
|
Multiplayer::PlayerConnectionConfig connectionConfig;
|
|
|
|
connectionConfig.m_playerConnectionId = 123;
|
|
|
|
connectionConfig.m_playerConnectionId = 123;
|
|
|
|
connectionConfig.m_playerSessionId = "dummyPlayerSessionId";
|
|
|
|
connectionConfig.m_playerSessionId = "dummyPlayerSessionId";
|
|
|
|
auto result = m_serverManager->AddConnectedTestPlayer(connectionConfig);
|
|
|
|
auto result = m_serverManager->AddConnectedTestPlayer(connectionConfig);
|
|
|
|
@ -631,7 +631,7 @@ R"({
|
|
|
|
|
|
|
|
|
|
|
|
TEST_F(GameLiftServerManagerTest, HandlePlayerLeaveSession_CallWithMultithread_OnlyOneNotificationIsSent)
|
|
|
|
TEST_F(GameLiftServerManagerTest, HandlePlayerLeaveSession_CallWithMultithread_OnlyOneNotificationIsSent)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AzFramework::PlayerConnectionConfig connectionConfig;
|
|
|
|
Multiplayer::PlayerConnectionConfig connectionConfig;
|
|
|
|
connectionConfig.m_playerConnectionId = 123;
|
|
|
|
connectionConfig.m_playerConnectionId = 123;
|
|
|
|
connectionConfig.m_playerSessionId = "dummyPlayerSessionId";
|
|
|
|
connectionConfig.m_playerSessionId = "dummyPlayerSessionId";
|
|
|
|
auto result = m_serverManager->AddConnectedTestPlayer(connectionConfig);
|
|
|
|
auto result = m_serverManager->AddConnectedTestPlayer(connectionConfig);
|
|
|
|
|