-
Notifications
You must be signed in to change notification settings - Fork 450
chore: Add a DA service unit test #3423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 34 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
ee6684c
chore: Add a DA service unit test
EmandM acdc798
temp trigger update for faster iteration
EmandM 9f9ab40
fix pvp exceptions
EmandM 4a04ed9
Fix code docs
EmandM d86da3e
fix formatting
EmandM 16b504b
remove backticks
EmandM b2fed7f
Add missing import
EmandM a10e61f
Swap the tests to run on ubuntu
EmandM e5d76bb
use inline command instead of funtion
EmandM d0e8d14
Fix while loop issue
EmandM 58aefa9
Stop changeownership message on spawn
EmandM c4498e5
try connect to service utp only
EmandM 8d07f34
update standalone service timeout to 1h
EmandM 60ca952
ensure active scene hash is always synchroniszed to the service
EmandM 8c5745d
Add timeout between rust tests
EmandM 9ec7b43
unbreak test
EmandM 76fdbf1
Merge branch 'develop-2.0.0' of https://github.com/Unity-Technologies…
EmandM b08c482
actually use the hosted service
EmandM d000e5a
Remove can connect test, we can connect. Run only CreateObjectNew()
EmandM ae2ddf0
Fix formatting
EmandM 07a51ff
lets go
EmandM 1324963
All tests passing
EmandM 5b6266a
Run tests against release rust build
EmandM 82138d5
Fix InScenePlacedNetworkObjectTests
EmandM 666e1d4
Only log cmb error logs
EmandM 48aa4cd
remove log lines
EmandM 7611a51
update port env variable
EmandM 4ef95a2
remove connection test
EmandM 4a3804c
fix bug in StartServerAndClientsWithTimeTravel
EmandM 41307ba
cleanup
EmandM a658445
Merge branch 'develop-2.0.0' of https://github.com/Unity-Technologies…
EmandM eaf54a1
further cleanup
EmandM db50def
code review comments
EmandM 3783c64
text - fix
NoelStephensUnity e95f56c
add comments to bash file and explicitly pass env variables to script
EmandM File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
# DESCRIPTION-------------------------------------------------------------------------- | ||
# This job is responsible for Desktop platform test validation. | ||
# Those tests cover both PlayMode and EditMode tests from package test assemblies. | ||
|
||
# CONFIGURATION STRUCTURE-------------------------------------------------------------- | ||
# Jobs are generated using nested loops (separate build phase and run phase). Worth noting that run phase uses the build as dependency: | ||
# 1. For all desktop platform (Windows, macOS, Ubuntu) | ||
|
@@ -17,17 +17,17 @@ | |
# 1. Build Phase: Creates standalone players for desktop platforms | ||
# 2. Run Phase: Executes runtime tests on actual desktop devices | ||
# The Run phase uses build job as dependency | ||
|
||
# Note: More of a Unity specific but test assemblies need to be included in the build phase command | ||
# Note: All builds can be made on x64 machines since those are compatible with ARM64 target devices | ||
|
||
# QUALITY THOUGHTS-------------------------------------------------------------------- | ||
# TODO: consider adding all projects that have tests | ||
# To see where this job is included (in trigger job definitions) look into _triggers.yml file | ||
|
||
#----------------------------------------------------------------------------------- | ||
|
||
|
||
# BUILD PHASE CONFIGURATION------------------------------------------------------------------------------------ | ||
{% for project in projects.default -%} | ||
{% for platform in test_platforms.desktop -%} | ||
|
@@ -58,10 +58,10 @@ desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ | |
{% endfor -%} | ||
{% endfor -%} | ||
{% endfor -%} | ||
|
||
|
||
|
||
|
||
# RUN PHASE CONFIGURATION------------------------------------------------------------------------------------ | ||
{% for project in projects.default -%} | ||
{% for platform in test_platforms.desktop -%} | ||
|
@@ -81,21 +81,17 @@ desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ | |
{% if platform.name != "win" %} # Issues with win and mac are tracked in MTT-11606 | ||
variables: | ||
ECHO_SERVER_PORT: "7788" | ||
CMB_SERVICE_PORT: "7799" | ||
# Set this to ensure the DA codec tests will fail if they cannot connect to the echo-server | ||
# The default is to ignore the codec tests if the echo-server fails to connect | ||
ENSURE_CODEC_TESTS: "true" | ||
USE_CMB_SERVICE: "true" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see where we are using it 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's inside the |
||
{% endif %} | ||
|
||
commands: | ||
# If ubuntu, run rust echo server (This is needed ONLY for NGOv2.X because relates to Distributed Authority) | ||
{% if platform.name != "win" %} # Issues with win and mac are tracked in MTT-11606 | ||
- git clone https://github.com/Unity-Technologies/mps-common-multiplayer-backend.git | ||
# Install rust | ||
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
# Build the echo server | ||
- cd ./mps-common-multiplayer-backend/runtime && $HOME/.cargo/bin/cargo build --example ngo_echo_server | ||
# Run the echo server in the background - this will reuse the artifacts from the build | ||
- cd ./mps-common-multiplayer-backend/runtime && $HOME/.cargo/bin/cargo run --example ngo_echo_server -- --port $ECHO_SERVER_PORT & | ||
- ./Tools/CI/run_cmb_service.sh | ||
NoelStephensUnity marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{% endif %} | ||
|
||
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# clone the latest rust repo | ||
NoelStephensUnity marked this conversation as resolved.
Show resolved
Hide resolved
|
||
git clone https://github.com/Unity-Technologies/mps-common-multiplayer-backend.git | ||
cd ./mps-common-multiplayer-backend/runtime | ||
|
||
# Install rust | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
export PATH="$HOME/.cargo/bin:$PATH" | ||
|
||
# Build the echo server | ||
cargo build --example ngo_echo_server | ||
|
||
# Run the echo server in the background - this will reuse the artifacts from the build | ||
cargo run --example ngo_echo_server -- --port $ECHO_SERVER_PORT & | ||
|
||
# Build a release version of the standalone server | ||
cargo build --release --locked | ||
|
||
# Run the standalone server on an infinite loop in the background | ||
while :; do ./target/release/comb-server -l error --metrics-port 5000 standalone --port $CMB_SERVICE_PORT -t 60m; done & |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.