1.16.5 How to detect that the server has started from outside of the JVM?

Discussion in 'Spigot Plugin Development' started by AuroraLS3, Jun 13, 2021.

  1. Hi,

    I've been trying to find out a way to automate a manual test that my plugin enables on all the different platforms properly. Until now I've toyed around with the idea of running the server and the plugin with a 2nd plugin that checks if the plugin has enabled properly and does exit(0) or exit(1) based on that.

    At work I've seen some nice testing done with robot framework and docker, where the services are started and then the robot test runs in another container.

    So only issue I still need to solve, is how do I detect that a server has finished starting? I think it might need some kind of packet communication since networking is easier than file access between containers, but looking at files is also an option
     
  2. Maybe you can have a look into writing your own plugin, while adding all the other plugins as dependencies using "depend". I've no idea what it would output at error messages, but I guess it should detect errors when plugins couldn't be started up.
     
  3. Maybe you could use the RCON protocol? I'm pretty sure that it starts listening to the port specified after the server has been started successfully.
     
    • Useful Useful x 1
  4. Read process output or log file