Embedded BaseX server exits whole process
Hi, in our junit tests we are starting BaseX server in embedded mode. The problem is that, if there is some problem (e.g. server socket is unable to bind to port), basex server will terminate whole process. When the process is terminated during automatic junit test execution, then maven surefire plugin will report that 0 test were executed and all passed ... and we will never know that there are some problems in our application code :( I am using following command to initialize BaseX server: server = new BaseXServer("-p" + port, "-d", "-D", "-s"); Environment: BaseX 6.7.1 regards, Igor Farinic
Dear Igor, thanks for your observation. This is something I wanted to have a look at for a longer time already, and your e-mail finally got me triggered. In the latest update (available via [1] and [2]), the Java process will only be terminated if the main() method of the BaseX, BaseXClient, BaseXServer or JaxRxServer class is called. Hope this helps, Christian [1] https://github.com/BaseXdb/basex [2] http://files.basex.org/releases/latest/ ___________________________ On Tue, Aug 9, 2011 at 5:17 PM, Igor Farinic <igor.farinic@evolveum.com> wrote:
Hi,
in our junit tests we are starting BaseX server in embedded mode. The problem is that, if there is some problem (e.g. server socket is unable to bind to port), basex server will terminate whole process. When the process is terminated during automatic junit test execution, then maven surefire plugin will report that 0 test were executed and all passed ... and we will never know that there are some problems in our application code :(
I am using following command to initialize BaseX server: server = new BaseXServer("-p" + port, "-d", "-D", "-s");
Environment: BaseX 6.7.1
regards, Igor Farinic
_______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Hi, in BaseX 6.7.2 Beta the process is not terminated, however it will not throw any exception/error and it blocks whole process. I noted strange behavior. In server log I see error address already in use. I have one server started on default port 1984 and I am trying to start another server on different port 19840. 13:03:34.371 Server was started. 13:03:34.375 Address already in use regards, Igor Farinic On 08/09/2011 05:17 PM, Igor Farinic wrote:
Hi,
in our junit tests we are starting BaseX server in embedded mode. The problem is that, if there is some problem (e.g. server socket is unable to bind to port), basex server will terminate whole process. When the process is terminated during automatic junit test execution, then maven surefire plugin will report that 0 test were executed and all passed ... and we will never know that there are some problems in our application code :(
I am using following command to initialize BaseX server: server = new BaseXServer("-p" + port, "-d", "-D", "-s");
Environment: BaseX 6.7.1
regards, Igor Farinic
_______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
participants (2)
-
Christian Grün -
Igor Farinic