File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,23 @@ da sie keine Verschachtelung erlaubt.
1818Im Server gibt es außerdem noch einige JUnit5-Tests.
1919Diese sollten bei größeren Änderungen direkt zum neuen Stil migriert werden.
2020
21+ ## Debugging unreliably failing tests
22+
23+ Sometimes, particularly when it comes to networking, a test only fails sporadically.
24+ To get a proper log, there are multiple approaches:
25+
26+ This runs any test containing the word 'GameState' until it fails:
27+
28+ ``` bash
29+ true && while test $? -eq 0; do ./gradlew :plugin:cleanTest :plugin:test --tests ' *GameState*' ; done
30+ ```
31+
32+ This can be particularly useful for some of our integration tests which are coded directly in gradle.
33+
34+ JUnit: Annotate the test with` @RepeatedTest(100) `
35+
36+ Kotest: https://kotest.io/docs/framework/testcaseconfig.html
37+
2138## XStream
2239
2340All network communication (client-server) is done via XML,
@@ -74,6 +91,7 @@ The information which implementations to use resides in [resources/META-INF/serv
7491is the common interface for objects sent via the XML Protocol.
7592
7693### [ Requests] ( sdk/src/server-api/sc/protocol/requests )
94+
7795- are all suffixed with ` Request `
7896- ask for an action or information
7997- any request that extends [ AdminLobbyRequest] ( sdk/src/server-api/sc/protocol/requests/ILobbyRequest.kt )
You can’t perform that action at this time.
0 commit comments