summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSofi <sofi+git@mailbox.org>2022-08-25 19:21:33 +0200
committerWinter <winter@winter.cafe>2022-08-27 00:16:11 -0400
commit6cb1065d6e1016f849aac902206527a969ba62b3 (patch)
tree9b6cde427fbdb77d3ed8e9988203a404b91db1a5
parentMerge pull request #188414 from NixOS/backport-188117-to-release-22.05 (diff)
downloadnixpkgs-6cb1065d6e1016f849aac902206527a969ba62b3.tar.gz
nixos/minecraft-server: optimize world generation inside test
Due to how complex minecraft world generation has gotten in recent years, it now can take several minutes to complete the first generation of a world seed, even on relatively new and powerful hardware. We are testing if a minecraft server can run inside of a nix enviroment, and not so much about stress testing the CI. Test running before this change: > (finished: waiting for TCP port 43000, in 118.49 seconds) Test running with this change: > (finished: waiting for TCP port 43000, in 27.88 seconds) Choice of using `level-type` and `generate-structures` was made as they support almost every version of minecraft. These two also make it extremely clear what it does, compared to the more complex `generator-settings` and all its toggles. (cherry picked from commit aed32f226430b51deaf53e4d64be153539795b77)
-rw-r--r--nixos/tests/minecraft-server.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/tests/minecraft-server.nix b/nixos/tests/minecraft-server.nix
index a51b36ff5308..6e733bb96c1c 100644
--- a/nixos/tests/minecraft-server.nix
+++ b/nixos/tests/minecraft-server.nix
@@ -18,6 +18,8 @@ in import ./make-test-python.nix ({ pkgs, ... }: {
serverProperties = {
enable-rcon = true;
level-seed = seed;
+ level-type = "flat";
+ generate-structures = false;
online-mode = false;
"rcon.password" = rcon-pass;
"rcon.port" = rcon-port;