From 48c438f469214f22119e51bf29d9d5ff1851b07a Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Mon, 25 Oct 2021 14:46:03 -0700 Subject: [PATCH] Reverting the debugging code I was using to narrow down the problem on Jenkins now that the issue was fixed by PR-4946 Signed-off-by: Gene Walters --- .../editor_python_test_tools/utils.py | 21 ++--------------- .../TcpTransport/TcpNetworkInterface.cpp | 5 ---- .../AzNetworking/TcpTransport/TcpSocket.cpp | 23 +++---------------- .../LevelSystem/SpawnableLevelSystem.cpp | 2 +- .../remote_console_commands.py | 2 +- 5 files changed, 7 insertions(+), 46 deletions(-) diff --git a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py index 713eb74f8c..d6f33a1726 100644 --- a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py +++ b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py @@ -83,31 +83,14 @@ class TestHelper: with Tracer() as section_tracer: multiplayer.PythonEditorFuncs_enter_game_mode() general.idle_wait_frames(1) - + # Make sure the server launcher binary exists unexpected_line = "LaunchEditorServer failed! The ServerLauncher binary is missing!" found_lines = [printInfo.message.strip() for printInfo in section_tracer.errors] found_unexpected_lines = [x for x in found_lines if unexpected_line in x] Report.critical_result(("ServerLauncher exists.", "ServerLauncher does not exist!"), not found_unexpected_lines) - TestHelper.wait_for_condition(lambda : multiplayer.PythonEditorFuncs_is_in_game_mode(), 30*60.0) - - # @todo delete! debugging Jenkins - Report.info("PRINTING THE ENTIRE SERVER LOG!") - - serverlog_filename = os.path.join(os.getcwd(), 'AutomatedTesting/user/log/Server.log') - - with open(serverlog_filename) as server_log_file: - Report.info( server_log_file.read() ) - Report.info("END: PRINTING THE ENTIRE SERVER LOG") - - #if not multiplayer.PythonEditorFuncs_is_in_game_mode(): - # 5) Check the ServerLauncher logs for expected log output - # Since the editor has started a server launcher, the RemoteConsole with the default port=4600 will automatically be able to read the server logs - # for line in expected_lines_server: - # assert server_console.expect_log_line(line, EXPECTEDLINE_WAIT_TIME_SECONDS), f"Expected line not found: {line}" - - + TestHelper.wait_for_condition(lambda : multiplayer.PythonEditorFuncs_is_in_game_mode(), 30.0) Report.critical_result(msgtuple_success_fail, multiplayer.PythonEditorFuncs_is_in_game_mode()) @staticmethod diff --git a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.cpp b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.cpp index c2d9f5f1d2..1ccff7be50 100644 --- a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.cpp +++ b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.cpp @@ -79,8 +79,6 @@ namespace AzNetworking ConnectionId TcpNetworkInterface::Connect(const IpAddress& remoteAddress) { - AZLOG_INFO("Attemping TcpNetworkInterface::Connect") - const ConnectionId connectionId = m_connectionSet.GetNextConnectionId(); AZStd::unique_ptr connection = AZStd::make_unique(connectionId, remoteAddress, *this, m_trustZone, net_TcpUseEncryption); AZ_Assert(connection->GetConnectionRole() == ConnectionRole::Connector, "Invalid role for connection"); @@ -89,9 +87,6 @@ namespace AzNetworking TcpSocket* tcpSocket = connection->GetTcpSocket(); if (tcpSocket == nullptr) { - AZLOG_ERROR( - "TcpNetworkInterface::Connect tcpSocket is null! How can this be? Returning InvalidConnectionId") - return InvalidConnectionId; } diff --git a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpSocket.cpp b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpSocket.cpp index f3b62e1913..e469b70640 100644 --- a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpSocket.cpp +++ b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpSocket.cpp @@ -68,31 +68,14 @@ namespace AzNetworking { Close(); - if (!SocketCreateInternal()) + if (!SocketCreateInternal() + || !BindSocketForConnectInternal(address) + || !(SetSocketNonBlocking(m_socketFd) && SetSocketNoDelay(m_socketFd))) { - AZ_Warning("TcpSocket", false, "Tcp::Connect failed. SocketCreateInternal is false"); - Close(); return false; } - if (!BindSocketForConnectInternal(address)) - { - AZ_Warning("TcpSocket", false, "Tcp::Connect failed. BindSocketForConnectInternal is false"); - - Close(); - return false; - } - - if (!(SetSocketNonBlocking(m_socketFd) && SetSocketNoDelay(m_socketFd))) - { - AZ_Warning("TcpSocket", false, "Tcp::Connect failed. SetSocketNonBlocking and SetSocketNoDelay is false"); - - Close(); - return false; - } - - return true; } diff --git a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp index ad15abd2b7..b2b67c3b75 100644 --- a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp +++ b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp @@ -152,7 +152,7 @@ namespace LegacyLevelSystem // [LYN-2376] Remove once legacy slice support is removed int SpawnableLevelSystem::GetLevelCount() { - AZ_Warning("SpawnableLevelSystem", false, "GetLevelCount - No longer supported."); + AZ_Assert(false, "GetLevelCount - No longer supported."); return 0; } diff --git a/Tools/RemoteConsole/ly_remote_console/ly_remote_console/remote_console_commands.py b/Tools/RemoteConsole/ly_remote_console/ly_remote_console/remote_console_commands.py index 31ec6663fb..559823c820 100755 --- a/Tools/RemoteConsole/ly_remote_console/ly_remote_console/remote_console_commands.py +++ b/Tools/RemoteConsole/ly_remote_console/ly_remote_console/remote_console_commands.py @@ -228,7 +228,7 @@ class RemoteConsole: def expect_log_line(self, match_string, timeout=30): # type: (str, int) -> bool """ - Looks for a log line event to expect within a time frame. Returns False if timeout is reached. + Looks for a log line event to expect within a time frame. Returns False is timeout is reached. :param match_string: The string to match that acts as a key :param timeout: The timeout to wait for the log line in seconds :return: boolean True if match_string found, False otherwise.