GridGain™ 2.0.3
Java API Specification

org.gridgain.grid.test
Enum GridTestVmParameters

java.lang.Object
  extended by java.lang.Enum<GridTestVmParameters>
      extended by org.gridgain.grid.test.GridTestVmParameters
All Implemented Interfaces:
Serializable, Comparable<GridTestVmParameters>

public enum GridTestVmParameters
extends Enum<GridTestVmParameters>

GridGain JUnit VM configuration parameters that can be used to override defaults.Note that VM configuration parameters have priority over the same configuration specified in @GridifyTest annotation.



See Also:

  Documentation
  Email Support
  Online Forums
  Issue Tracking

Author:   2005-2008 Copyright © GridGain Systems. All Rights Reserved. ver. 2.0.3

 

Enum Constant Summary
GRID_CONFIG
          Name of VM parameter to specify path to GridGain configuration used to run distributed JUnits.
GRID_DISABLED
          Name of VM parameter to disable grid.
GRID_NAME
          Name of VM parameter that specifies name of the grid started for distributed junits.
GRID_ROUTER_PREFER_REMOTE
          Name of VM parameter to specify whether tests should be preferably routed to remote nodes.
GRID_TEST_ROUTER
          Name of VM parameter to specify full class name of JUnit router.
GRID_TEST_TIMEOUT
          Optional timeout in milliseconds for distributed test suites.
 
Method Summary
static GridTestVmParameters valueOf(String name)
          Returns the enum constant of this type with the specified name.
static GridTestVmParameters[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

GRID_DISABLED

public static final GridTestVmParameters GRID_DISABLED
Name of VM parameter to disable grid. The value of the parameter should be either true or false. The default value is false.

For example, the parameter "-DGRID_DISABLED=true" will disable grid and force all tests to execute locally.


GRID_TEST_ROUTER

public static final GridTestVmParameters GRID_TEST_ROUTER
Name of VM parameter to specify full class name of JUnit router. By default GridTestRouterAdapter name is used.

For example, the parameter "-DGRID_JUNIT_ROUTER=foo.bar.MyJunitRouter" will specify a custom JUnit router. The specified router muster have an empty constructor.


GRID_CONFIG

public static final GridTestVmParameters GRID_CONFIG
Name of VM parameter to specify path to GridGain configuration used to run distributed JUnits. By default "config/junit/junit-spring.xml" is used.

For example, the parameter "-DGRID_JUNIT_CONFIG="c:/foo/bar/mygrid-spring.xml" overrides the default configuration path.


GRID_TEST_TIMEOUT

public static final GridTestVmParameters GRID_TEST_TIMEOUT
Optional timeout in milliseconds for distributed test suites. By default, test suites never timeout. For example, the parameter "-DGRID_TEST_TIMEOUT=600000" will stop test suite execution after 10 minutes.


GRID_ROUTER_PREFER_REMOTE

public static final GridTestVmParameters GRID_ROUTER_PREFER_REMOTE
Name of VM parameter to specify whether tests should be preferably routed to remote nodes. This parameter is used by GridTestRouterAdapter which will use remote nodes if there any, otherwise local node will still be used.

The value of this parameter is either true or false. For example, the parameter "-DGRID_ROUTER_PERFER_REMOTE=true" will tell the router to prefer remote nodes for execution.


GRID_NAME

public static final GridTestVmParameters GRID_NAME
Name of VM parameter that specifies name of the grid started for distributed junits. This parameter should not be set explicitely. GridGain will detect grid name from the configuration file and set it as system properties, so nested JUnit tests or suites will be able to detect if grid has been started to avoid double starts.

Method Detail

values

public static final GridTestVmParameters[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(GridTestVmParameters c : GridTestVmParameters.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static GridTestVmParameters valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name

GridGain™ 2.0.3
Java API Specification

GridGain™ - Grid Computing Made Simple, ver. 2.0.3.20052008
2005-2008 Copyright © GridGain Systems. All Rights Reserved.