Author: peter_firmstone Date: Sun Apr 28 10:21:57 2013 New Revision: 1476748
URL: http://svn.apache.org/r1476748 Log: Thread visibility fixes for failing test: com/sun/jini/test/spec/lookupdiscovery/MulticastMonitorReplaceNone.td Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/MasterTest.java river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/NonActivatableGroupAdmin.java river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupdiscovery/MulticastMonitorReplace.java Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/MasterTest.java URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/MasterTest.java?rev=1476748&r1=1476747&r2=1476748&view=diff ============================================================================== --- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/MasterTest.java (original) +++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/MasterTest.java Sun Apr 28 10:21:57 2013 @@ -46,21 +46,21 @@ class MasterTest { private final static int EXTERNAL_REQUEST_PORT=10005; /** The logger */ - private static Logger logger = + private final static Logger logger = Logger.getLogger("com.sun.jini.qa.harness"); /** The System.err stream created when the process was exec'd */ - private static PrintStream origErr; + private volatile static PrintStream origErr; /** The QAConfig instance, read from System.in */ - private static QAConfig config; + private volatile static QAConfig config; /** obtained from QATestEnvironment after construct returns */ - private static AdminManager manager; + private volatile static AdminManager manager; - private static SlaveTest slaveTest; + private volatile static SlaveTest slaveTest; - private static String callAutot; + private volatile static String callAutot; /** * The main method invoked in the test VM. The first argument is assumed to @@ -316,7 +316,7 @@ class MasterTest { private static class RequestHandler implements Runnable { - TestEnvironment testExEnv; + final TestEnvironment testExEnv; RequestHandler(TestEnvironment test) { this.testExEnv =test; Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/NonActivatableGroupAdmin.java URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/NonActivatableGroupAdmin.java?rev=1476748&r1=1476747&r2=1476748&view=diff ============================================================================== --- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/NonActivatableGroupAdmin.java (original) +++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/NonActivatableGroupAdmin.java Sun Apr 28 10:21:57 2013 @@ -36,29 +36,29 @@ public class NonActivatableGroupAdmin ex implements Admin { /** the logger */ - private static Logger logger = + private final static Logger logger = Logger.getLogger("com.sun.jini.qa.harness"); /** the group proxy */ - private NonActivatableGroup proxy; + private volatile NonActivatableGroup proxy; /** the system process */ - private Process process; + private volatile Process process; /** the stdout pipe, which mustn't be GC'd */ - private Pipe outPipe; + private volatile Pipe outPipe; /** service options provided by the 5-arg constructor */ - private String[] options; + private final String[] options; /** service properties provided by the 5-arg constructor */ - private String[] properties; + private final String[] properties; /** merge of group options and service options */ - private String[] combinedOptions; + private volatile String[] combinedOptions; /** merge of group properties and service properties */ - private String[] combinedProperties; + private volatile String[] combinedProperties; /** * Construct an instance of <code>NonActivatableGroupAdmin</code>. @@ -98,6 +98,8 @@ public class NonActivatableGroupAdmin ex int index) { super(config, serviceName, index); + options = new String[0]; + properties = options; } /** @@ -180,9 +182,9 @@ public class NonActivatableGroupAdmin ex /** * Annotator for annotating output merged into test log */ - private class NonActGrpAnnotator implements Pipe.Annotator { + private static class NonActGrpAnnotator implements Pipe.Annotator { - private String annotation; + private final String annotation; NonActGrpAnnotator(String annotation) { this.annotation = annotation; Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupdiscovery/MulticastMonitorReplace.java URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupdiscovery/MulticastMonitorReplace.java?rev=1476748&r1=1476747&r2=1476748&view=diff ============================================================================== --- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupdiscovery/MulticastMonitorReplace.java (original) +++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupdiscovery/MulticastMonitorReplace.java Sun Apr 28 10:21:57 2013 @@ -65,8 +65,8 @@ import java.util.List; */ public class MulticastMonitorReplace extends Discovered { - protected String[] replacementGroups = null;//null ==> generate new groups - protected int nLookupsToReplace = 0; + protected volatile String[] replacementGroups = null;//null ==> generate new groups + protected volatile int nLookupsToReplace = 0; /** Performs actions necessary to prepare for execution of the * current test (refer to the description of this method in the
