6.7. Clustertest Test Framework

6.7.1. Introduction and Overview

The clustertest framework is implemented in Java, where tests are implemented in the interpreted JavaScript language. The use of Java made it much easier to implement tests involving concurrent activities, both in terms of inducing test load, and in, concurrently changing configuration of the replication cluster.

It consists of two physical portions:

6.7.2. DISORDER - DIStributed ORDER test

The DISORDER or DIStributed ORDER test is intended to provide concurrency tests involving a reasonably sophisticated schema to validate various aspects of Slony-I behavior under concurrent load.

It consists of:

6.7.2.1. Configuring DISORDER

DISORDER test configuration may be found in the following files:

  • conf/disorder.properties.sample

    This file contains Java style properties indicating how to connect to the various databases used by the DISORDER tests, including paths to tools such as slon and slonik

    The sample file is to be copied to conf/disorder.properties, and customized to indicate your local configuration. By using a .sample file, a developer may run tests within a Git tree, and not need to worry about their customizations interfering with the "canonical" sample configuration provided.

  • conf/java.conf.sample

    This is a shell script containing a path indicating where the clustertest Java code (e.g. - the clustertest-coordinator.jar file) may be found. This is also used, indirectly to determine where additional Java .jar files such as the JDBC driver are located.

    As with the disorder properties, above, this needs to be copied to conf/java.conf, and customized to indicate one's own local configuration.

  • conf/log4j.properties

    See documentation for Log4J for more details as to how this is configured; the defaults provided likely do not need to be altered.

6.7.3. Regression Tests

These tests represent a re-coding of the tests previously implemented as shell scripts using the clustertest framework.

These tests have gradually been enhanced to provide coverage of scenarios with which Slony-I has had problems; it is to be expected that new bugs may lead to the addition of further tests.

6.7.3.1. Configuring Regression Tests

Similar to the Section 6.7.2.1 for DISORDER tests, there are three configuration parameters:

  • conf/slonyregress.properties.sample

    This file contains Java style properties indicating how to connect to the various databases used by the regression tests, including paths to tools such as slon and slonik

    The sample file is to be copied to conf/slonyregress.properties, and customized to indicate your local configuration. By using a .sample file, a developer may run tests within a Git tree, and not need to worry about their customizations interfering with the "canonical" sample configuration provided.

  • conf/java.conf.sample

    This is a shell script containing a path indicating where the clustertest Java code (e.g. - the clustertest-coordinator.jar file) may be found. This is also used, indirectly to determine where additional Java .jar files such as the JDBC driver are located.

  • conf/log4j.properties

    Identical to configuration for DISORDER.