Version 3 (modified by ibaldin, 9 years ago)


Testing substrate handlers

Handlers can invoke tasks directly on the substrate or do so via Node Agent (NA) deployed in the substrate.

To test handlers, tools/cmdline project is used. It creates an instance of ORCA that is running outside a container and allows to execute handler tasks from the commandline. It is possible to do so either with or without emulation mode turned on.

Testing handlers without NA component

  1. Build ORCA
    $ mvn install
  2. Prepare handlers for execution in the commandline project. Note that because this command attempts to start ORCA instance, you must have mysql with valid schema and dataset running on the localhost. Note that ORCA deployment tree is created under tools/cmdline (including all plugins and handlers, and that is where they are executed from).
    $ cd tools/cmdline
    $ ant test.handler.prepare
  3. Test handler
    $ ant test.handler -Dtarget=<join|leave> <-Demulation=true|false> -Dhandler=<path to handler xml file in tools/cmdline subtree> <-DsomeProperty=any other properties>

Testing handlers with NA components