File tree Expand file tree Collapse file tree 4 files changed +33
-1
lines changed
unexpected-server-state-recovery Expand file tree Collapse file tree 4 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,16 @@ load ../util.bash
5
5
project=" ./tests/bats/legacy-forge"
6
6
7
7
@test " Legacy Forge - Test lazymc stops server when idle" {
8
+ # restart the lazymc container
9
+ restart_container lazymc-legacy-forge
10
+
11
+ # reset the start timestamp
12
+ reset_timestamp
13
+
14
+ #
15
+ # The above steps ensures that the containers are in a clean state
16
+ #
17
+
8
18
# wait for lazymc process to start
9
19
wait_for_formatted_log " lazymc-legacy-forge" " INFO" " lazymc-docker-proxy::entrypoint" " Starting lazymc process for group: mc..."
10
20
Original file line number Diff line number Diff line change @@ -5,6 +5,16 @@ load ../util.bash
5
5
project=" ./tests/bats/multi-server"
6
6
7
7
@test " Multiple Servers - Test primary and secondary servers stop when idle" {
8
+ # restart the lazymc container
9
+ restart_container lazymc-multi-server
10
+
11
+ # reset the start timestamp
12
+ reset_timestamp
13
+
14
+ #
15
+ # The above steps ensures that the containers are in a clean state
16
+ #
17
+
8
18
# wait for primary lazymc process to start
9
19
wait_for_formatted_log " lazymc-multi-server" " INFO" " lazymc-docker-proxy::entrypoint" " Starting lazymc process for group: primary..."
10
20
Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ project="./tests/bats/unexpected-server-state-recovery"
33
33
# wait for the mincraft server to be ready
34
34
wait_for_log " mc-unexpected-server-state-recovery" " RCON running on 0.0.0.0:25575" 300
35
35
36
+ wait_for_formatted_log " lazymc-unexpected-server-state-recovery" " INFO" " mc::lazymc::monitor" " Server is now online"
37
+
36
38
# start the client container to make lazymc want to shutdown the server
37
39
start_container mc-client-unexpected-server-state-recovery
38
40
@@ -43,7 +45,7 @@ project="./tests/bats/unexpected-server-state-recovery"
43
45
stop_container mc-client-unexpected-server-state-recovery
44
46
45
47
# wait for lazymc to be in an unexpected state
46
- wait_for_formatted_log " lazymc-unexpected-server-state-recovery" " WARN" " mc::lazymc" " Failed to stop server, no more suitable stopping method to use" 120
48
+ wait_for_formatted_log " lazymc-unexpected-server-state-recovery" " WARN" " mc::lazymc" " Failed to stop server, no more suitable stopping method to use" 300
47
49
48
50
# wait for lazymc-docker-proxy to detect the server is in an unexpected state
49
51
wait_for_formatted_log " lazymc-unexpected-server-state-recovery" " WARN" " lazymc-docker-proxy::entrypoint" " Unexpected server state detected, force stopping mc server container..."
Original file line number Diff line number Diff line change @@ -5,6 +5,16 @@ load ../util.bash
5
5
project=" ./tests/bats/vanilla"
6
6
7
7
@test " Vanilla - Test lazymc stops server when idle" {
8
+ # restart the lazymc container
9
+ restart_container lazymc-vanilla
10
+
11
+ # reset the start timestamp
12
+ reset_timestamp
13
+
14
+ #
15
+ # The above steps ensures that the containers are in a clean state
16
+ #
17
+
8
18
# wait for lazymc process to start
9
19
wait_for_formatted_log " lazymc-vanilla" " INFO" " lazymc-docker-proxy::entrypoint" " Starting lazymc process for group: mc..."
10
20
You can’t perform that action at this time.
0 commit comments