Skip to content

Commit 8cd07bd

Browse files
committed
docs(md): move in a section from notion
1 parent f7bf3cc commit 8cd07bd

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

GUIDELINES.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,23 @@ da sie keine Verschachtelung erlaubt.
1818
Im Server gibt es außerdem noch einige JUnit5-Tests.
1919
Diese 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

2340
All network communication (client-server) is done via XML,
@@ -74,6 +91,7 @@ The information which implementations to use resides in [resources/META-INF/serv
7491
is 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)

0 commit comments

Comments
 (0)