Adding automated tests for Autonomous->Authority and Server->Authority RPCs

Signed-off-by: Gene Walters <genewalt@amazon.com>
monroegm-disable-blank-issue-2
Gene Walters 4 years ago
parent 4919cb3450
commit dcc7ad6e71

@ -73,6 +73,18 @@ def Multiplayer_AutoComponent_RPC():
helper.succeed_if_log_line_found('EditorServer', "Script: AutoComponent_RPC_NetLevelEntity: Authority sending RPC to play some fx.", section_tracer.prints, PLAYFX_RPC_WAIT_TIME_SECONDS) helper.succeed_if_log_line_found('EditorServer', "Script: AutoComponent_RPC_NetLevelEntity: Authority sending RPC to play some fx.", section_tracer.prints, PLAYFX_RPC_WAIT_TIME_SECONDS)
helper.succeed_if_log_line_found('Script', "AutoComponent_RPC_NetLevelEntity: I'm a client playing some fx.", section_tracer.prints, PLAYFX_RPC_WAIT_TIME_SECONDS) helper.succeed_if_log_line_found('Script', "AutoComponent_RPC_NetLevelEntity: I'm a client playing some fx.", section_tracer.prints, PLAYFX_RPC_WAIT_TIME_SECONDS)
# Autonomous->Authority RPC
AUTONOMOUS_TO_AUTHORITY_RPC_WAIT_TIME_SECONDS = 1.0 # This RPC is sent from the server as soon as the player script is spawned. 1 second should be more than enough time to send/receive that RPC.
helper.succeed_if_log_line_found('Script', "AutoComponent_RPC: Sending AutonomousToAuthorityNoParam RPC.", section_tracer.prints, AUTONOMOUS_TO_AUTHORITY_RPC_WAIT_TIME_SECONDS)
helper.succeed_if_log_line_found('Script', "AutoComponent_RPC: Sending AutonomousToAuthority RPC (with float param).", section_tracer.prints, AUTONOMOUS_TO_AUTHORITY_RPC_WAIT_TIME_SECONDS)
helper.succeed_if_log_line_found('EditorServer', "Script: AutoComponent_RPC: Successfully received AutonomousToAuthorityNoParams RPC.", section_tracer.prints, AUTONOMOUS_TO_AUTHORITY_RPC_WAIT_TIME_SECONDS)
helper.succeed_if_log_line_found('EditorServer', "Script: AutoComponent_RPC: Successfully received AutonomousToAuthorityRPC.", section_tracer.prints, AUTONOMOUS_TO_AUTHORITY_RPC_WAIT_TIME_SECONDS)
# Server->Authority RPC. Inter-Entity Communication.
SERVER_TO_AUTHORITY_RPC_WAIT_TIME_SECONDS = 1.0 # This RPC is sent from the server as soon as the player script is spawned. 1 second should be more than enough time to send/receive that RPC.
helper.succeed_if_log_line_found('EditorServer', "Script: AutoComponent_RPC_NetLevelEntity: Send ServerToAuthority RPC.", section_tracer.prints, SERVER_TO_AUTHORITY_RPC_WAIT_TIME_SECONDS)
helper.succeed_if_log_line_found('EditorServer', "Script: AutoComponent_RPC: Received ServerToAuthority RPC. Damage=42.", section_tracer.prints, SERVER_TO_AUTHORITY_RPC_WAIT_TIME_SECONDS)
# Exit game mode # Exit game mode
helper.exit_game_mode(TestSuccessFailTuples.exit_game_mode) helper.exit_game_mode(TestSuccessFailTuples.exit_game_mode)

@ -669,8 +669,14 @@
"Component_[7256163899440301540]": { "Component_[7256163899440301540]": {
"$type": "EditorScriptCanvasComponent", "$type": "EditorScriptCanvasComponent",
"Id": 7256163899440301540, "Id": 7256163899440301540,
"m_name": "AutoComponent_RPC_NetLevelEntity", "m_name": "AutoComponent_RPC_NetLevelEntity.scriptcanvas",
"runtimeDataIsValid": true, "runtimeDataIsValid": true,
"runtimeDataOverrides": {
"source": {
"id": "{1D517006-AC01-5ECA-AE66-0E007871F0CD}",
"path": "C:/prj/o3de/AutomatedTesting/Levels/Multiplayer/AutoComponent_RPC/AutoComponent_RPC_NetLevelEntity.scriptcanvas"
}
},
"sourceHandle": { "sourceHandle": {
"id": "{1D517006-AC01-5ECA-AE66-0E007871F0CD}", "id": "{1D517006-AC01-5ECA-AE66-0E007871F0CD}",
"path": "levels/multiplayer/autocomponent_rpc/autocomponent_rpc_netlevelentity.scriptcanvas" "path": "levels/multiplayer/autocomponent_rpc/autocomponent_rpc_netlevelentity.scriptcanvas"

@ -91,22 +91,10 @@
"$type": "EditorScriptCanvasComponent", "$type": "EditorScriptCanvasComponent",
"Id": 10596595655489113153, "Id": 10596595655489113153,
"m_name": "AutoComponent_RPC", "m_name": "AutoComponent_RPC",
"m_assetHolder": {
"m_asset": {
"assetId": {
"guid": "{5ED120C4-07DC-56F1-80A7-37BFC98FD74E}"
},
"assetHint": "levels/multiplayer/autocomponent_rpc/autocomponent_rpc.scriptcanvas"
}
},
"runtimeDataIsValid": true, "runtimeDataIsValid": true,
"runtimeDataOverrides": { "sourceHandle": {
"source": { "id": "{5ED120C4-07DC-56F1-80A7-37BFC98FD74E}",
"assetId": { "path": "levels/multiplayer/autocomponent_rpc/autocomponent_rpc.scriptcanvas"
"guid": "{5ED120C4-07DC-56F1-80A7-37BFC98FD74E}"
},
"assetHint": "levels/multiplayer/autocomponent_rpc/autocomponent_rpc.scriptcanvas"
}
} }
}, },
"Component_[11440172471478606933]": { "Component_[11440172471478606933]": {
@ -184,6 +172,13 @@
"$type": "EditorEntityIconComponent", "$type": "EditorEntityIconComponent",
"Id": 9407892837096707905 "Id": 9407892837096707905
}, },
"Component_[9505416969829669337]": {
"$type": "EditorTagComponent",
"Id": 9505416969829669337,
"Tags": [
"Player"
]
},
"Component_[9878555871810913249]": { "Component_[9878555871810913249]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 9878555871810913249, "Id": 9878555871810913249,

Loading…
Cancel
Save