changeset 405:c0b0577ecbe4

Get rid of repeated sout/serr in reproducers testcases/unit tests and introduce bottleneck for loging.
author Jiri Vanek <jvanek@redhat.com>
date Mon, 28 May 2012 11:00:49 +0200
parents 6df151bb5320
children c04c3b9576db
files ChangeLog tests/jnlp_tests/signed/AppletTestSigned/testcases/AppletTestSignedTests.java tests/jnlp_tests/signed/CacheReproducer/testcases/CacheReproducerTest.java tests/jnlp_tests/signed/MissingJar/testcases/MissingJarTest.java tests/jnlp_tests/signed/ReadPropertiesBySignedHack/testcases/ReadPropertiesBySignedHackTest.java tests/jnlp_tests/signed/ReadPropertiesSigned/testcases/ReadPropertiesSignedTest.java tests/jnlp_tests/signed/Spaces can be everywhere signed/testcases/SpacesCanBeEverywhereTestsSigned.java tests/jnlp_tests/simple/AccessClassInPackage/testcases/AccessClassInPackageTest.java tests/jnlp_tests/simple/AddShutdownHook/testcases/AddShutdownHookTest.java tests/jnlp_tests/simple/AllStackTraces/testcases/AllStackTracesTest.java tests/jnlp_tests/simple/AppletTest/testcases/AppletTestTests.java tests/jnlp_tests/simple/CheckServices/testcases/CheckServicesTests.java tests/jnlp_tests/simple/CreateClassLoader/testcases/CreateClassLoaderTest.java tests/jnlp_tests/simple/InformationTitleVendorParser/testcases/InformationTitleVendorParserTest.java tests/jnlp_tests/simple/ManifestedJar1/testcases/ManifestedJar1Test.java tests/jnlp_tests/simple/ReadEnvironment/testcases/ReadEnvironmentTest.java tests/jnlp_tests/simple/ReadProperties/testcases/ReadPropertiesTest.java tests/jnlp_tests/simple/RedirectStreams/testcases/RedirectStreamsTest.java tests/jnlp_tests/simple/ReplaceSecurityManager/testcases/ReplaceSecurityManagerTest.java tests/jnlp_tests/simple/SetContextClassLoader/testcases/SetContextClassLoaderTest.java tests/jnlp_tests/simple/Spaces can be everywhere/testcases/SpacesCanBeEverywhereTests.java tests/jnlp_tests/simple/deadlocktest/testcases/DeadLockTestTest.java tests/jnlp_tests/simple/simpletest1/testcases/SimpleTest1Test.java tests/jnlp_tests/simple/simpletest2/testcases/SimpleTest2Test.java tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java tests/netx/unit/net/sourceforge/jnlp/cache/CacheLRUWrapperTest.java tests/netx/unit/net/sourceforge/jnlp/runtime/CodeBaseClassLoaderTest.java tests/netx/unit/net/sourceforge/jnlp/util/replacements/BASE64EncoderTest.java
diffstat 28 files changed, 155 insertions(+), 332 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri May 25 11:44:13 2012 -0400
+++ b/ChangeLog	Mon May 28 11:00:49 2012 +0200
@@ -1,3 +1,21 @@
+2012-05-20  Jiri Vanek  <jvanek@redhat.com>
+
+	Get rid of repeated sout/serr  in reproducers testcases/unit tests and
+	introduce bottleneck for loging.
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java:
+	(PROCESS_LOG) static flag for enabling/disabling automatic logging of 
+	statically executed processes.
+	(logErrorReprint) (logOutputReprint) (logNoReprint) new methods, to call  
+	logging bottleneck.
+	(log) main logging bottleneck, reprint message to according stream with 
+	calling test-class and test-method as suffix.
+	(getTestMethod) new method to analyze calling test-method.
+	(executeProcess) enhanced for conditional automatic logging of start of
+	process and outputs of process.
+	* /tests/jnlp_tests/*/*/testcases/*.java : and
+	* /tests/netx/unit/**.java: all System.out replaced by ServerAccess.logOutputReprint 
+	and System.err replaced by ServerAccess.logErrorReprint 
+
 2012-05-25  Adam Domurad <adomurad@redhat.com>
 
 	Changed for-loops over iterators and indices to for-each loops if they
--- a/tests/jnlp_tests/signed/AppletTestSigned/testcases/AppletTestSignedTests.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/jnlp_tests/signed/AppletTestSigned/testcases/AppletTestSignedTests.java	Mon May 28 11:00:49 2012 +0200
@@ -51,11 +51,7 @@
 
     @Test
     public void AppletTestSignedTest() throws Exception {
-        System.out.println("connecting AppletTestSigned request");
-        System.err.println("connecting AppletTestSigned request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/AppletTestSigned.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         evaluateSignedApplet(pr);
         Assert.assertFalse(pr.wasTerminated);
         Assert.assertEquals((Integer) 0, pr.returnValue);
@@ -82,13 +78,9 @@
 
     @Test
     public void AppletTestSignedFirefoxTest() throws Exception {
-        System.out.println("connecting AppletTestSigned in firefox request");
-        System.err.println("connecting AppletTestSigned in firefox request");
         ServerAccess.PROCESS_TIMEOUT = 30 * 1000;
         try {
             ServerAccess.ProcessResult pr = server.executeBrowser("/AppletTestSigned.html");
-            System.out.println(pr.stdout);
-            System.err.println(pr.stderr);
             evaluateSignedApplet(pr);
             Assert.assertTrue(pr.wasTerminated);
             //Assert.assertEquals((Integer) 0, pr.returnValue); due to destroy is null
--- a/tests/jnlp_tests/signed/CacheReproducer/testcases/CacheReproducerTest.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/jnlp_tests/signed/CacheReproducer/testcases/CacheReproducerTest.java	Mon May 28 11:00:49 2012 +0200
@@ -258,11 +258,7 @@
             @Override
             public void run() {
                 try {
-                    System.out.println("connecting deadlocktest request");
-                    System.err.println("connecting deadlocktest request");
                     ServerAccess.ProcessResult pr = server.executeJavawsHeadless(verbosed, "/deadlocktest.jnlp");
-                    System.out.println(pr.stdout);
-                    System.err.println(pr.stderr);
                 } catch (Exception ex) {
                     throw new RuntimeException(ex);
                 }
@@ -271,8 +267,6 @@
         t.start();
         Thread.sleep(1000);
         pr = tryToClearcache();
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String q = "Can not clear cache at this time";
         Assert.assertTrue("Stderr should contain " + q + ", but did not.", pr.stderr.contains(q));
         assertCacheIsNotEmpty();
@@ -338,8 +332,6 @@
     }
 
     private static void clearAndEvaluateCache(boolean force) throws Exception {
-        System.out.println("clearing cache");
-        System.err.println("clearing cache");
         if (force) {
             if (netxLock.isFile()) {
                 boolean b = netxLock.delete();
@@ -458,11 +450,7 @@
     }
 
     private static ServerAccess.ProcessResult runSimpleTest1(List<String> args, String s) throws Exception {
-        System.out.println("connecting " + s + " request");
-        System.err.println("connecting " + s + " request");
         ServerAccess.ProcessResult pr2 = server.executeJavawsHeadless(args, "/" + s + ".jnlp");
-        System.out.println(pr2.stdout);
-        System.err.println(pr2.stderr);
         return pr2;
     }
 
@@ -483,8 +471,6 @@
 
     private static ProcessResult tryToClearcache() throws Exception {
         ServerAccess.ProcessResult pr1 = ServerAccess.executeProcess(clear);
-        System.out.println(pr1.stdout);
-        System.err.println(pr1.stderr);
         return pr1;
     }
 }
--- a/tests/jnlp_tests/signed/MissingJar/testcases/MissingJarTest.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/jnlp_tests/signed/MissingJar/testcases/MissingJarTest.java	Mon May 28 11:00:49 2012 +0200
@@ -50,8 +50,6 @@
     private final List<String> l = Collections.unmodifiableList(Arrays.asList(new String[]{"-Xtrustall"}));
 
     private void evaluateResult(ProcessResult pr) {
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String c = "only fixed classloader can initialize this app";
         Assert.assertTrue("stdout should contains `" + c + "`, but didn't ", pr.stdout.contains(c));
         String cc = "ClassNotFoundException";
@@ -62,33 +60,25 @@
 
     @Test
     public void MissingJarTest1() throws Exception {
-        System.out.println("connecting MissingJar1 request");
-        System.err.println("connecting MissingJar1 request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/MissingJar.jnlp");
         evaluateResult(pr);
     }
 
     @Test
     public void MissingJarTest2() throws Exception {
-        System.out.println("connecting MissingJar2 request");
-        System.err.println("connecting MissingJar2 request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/MissingJar2.jnlp");
         evaluateResult(pr);
     }
 
     @Test
     public void MissingJarTest3() throws Exception {
-        System.out.println("connecting MissingJar3 request");
-        System.err.println("connecting MissingJar3 request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/MissingJar3.jnlp");
         evaluateResult(pr);
     }
 
     @Test
     public void MissingJarTest4() throws Exception {
-        System.out.println("connecting MissingJar4 request");
-        System.err.println("connecting MissingJar4 request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/MissingJar4.jnlp");
         evaluateResult(pr);
     }
-}
\ No newline at end of file
+}
--- a/tests/jnlp_tests/signed/ReadPropertiesBySignedHack/testcases/ReadPropertiesBySignedHackTest.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/jnlp_tests/signed/ReadPropertiesBySignedHack/testcases/ReadPropertiesBySignedHackTest.java	Mon May 28 11:00:49 2012 +0200
@@ -52,11 +52,7 @@
     @Test
     public void ReadPropertiesBySignedHackWithjoutXtrustAll() throws Exception {
         //no request for permissions
-        System.out.println("connecting ReadPropertiesBySignedHack request");
-        System.err.println("connecting ReadPropertiesBySignedHack request");
         ServerAccess.ProcessResult pr=server.executeJavawsHeadless(l,"/ReadPropertiesBySignedHack.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s="java.lang.SecurityException: class \"ReadProperties\"'s signer information does not match signer information of other classes in the same package";
         Assert.assertTrue("Stderr should contains "+s+" but did not",pr.stderr.contains(s));
         String ss="ClassNotFoundException";
--- a/tests/jnlp_tests/signed/ReadPropertiesSigned/testcases/ReadPropertiesSignedTest.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/jnlp_tests/signed/ReadPropertiesSigned/testcases/ReadPropertiesSignedTest.java	Mon May 28 11:00:49 2012 +0200
@@ -53,11 +53,7 @@
     @Test
     public void ReadSignedPropertiesWithoutPermissionsWithXtrustAll() throws Exception {
         //no request for permissions
-        System.out.println("connecting ReadPropertiesSigned1 request");
-        System.err.println("connecting ReadPropertiesSigned1 request");
         ServerAccess.ProcessResult pr=server.executeJavawsHeadless(l,"/ReadPropertiesSigned1.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         Assert.assertTrue("Stderr should match "+accessMatcher+" but did not",pr.stderr.matches(accessMatcher));
         String ss="ClassNotFoundException";
         Assert.assertFalse("Stderr should not contains "+ss+" but did",pr.stderr.contains(ss));
@@ -69,11 +65,7 @@
     @Test
     public void ReadSignedPropertiesWithPermissionsWithXtrustAll() throws Exception {
         //request for allpermissions
-        System.out.println("connecting ReadPropertiesSigned2 request");
-        System.err.println("connecting ReadPropertiesSigned2 request");
         ServerAccess.ProcessResult pr=server.executeJavawsHeadless(l,"/ReadPropertiesSigned2.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         Assert.assertFalse("Stderr should NOT match "+accessMatcher+" but did",pr.stderr.matches(accessMatcher));
         String ss="ClassNotFoundException";
         Assert.assertFalse("Stderr should not contains "+ss+" but did",pr.stderr.contains(ss));
@@ -84,11 +76,7 @@
 
     @Test
     public void EnsureXtrustallNotAffectingUnsignedBehaviour() throws Exception {
-        System.err.println("connecting ReadPropertiesSigned3 request");
-        System.out.println("connecting ReadPropertiesSigned3 request");
         ServerAccess.ProcessResult pr=server.executeJavawsHeadless(l,"/ReadProperties1.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         Assert.assertTrue("Stderr should match "+accessMatcher+" but did not",pr.stderr.matches(accessMatcher));
         String ss="ClassNotFoundException";
         Assert.assertFalse("Stderr should not contains "+ss+" but did",pr.stderr.contains(ss));
--- a/tests/jnlp_tests/signed/Spaces can be everywhere signed/testcases/SpacesCanBeEverywhereTestsSigned.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/jnlp_tests/signed/Spaces can be everywhere signed/testcases/SpacesCanBeEverywhereTestsSigned.java	Mon May 28 11:00:49 2012 +0200
@@ -53,8 +53,6 @@
     @Test
     @NeedsDisplay
     public void SpacesCanBeEverywhereLocalAppletTestsJnlp2Signed() throws Exception {
-        System.out.println("connecting NotOnly spaces can kill ěščřž too signed.jnlp request");
-        System.err.println("connecting NotOnly spaces can kill ěščřž too signed.jnlp request");
         List<String> commands=new ArrayList<String>(1);
         commands.add(server.getJavawsLocation());
         commands.add(server.getDir()+"/NotOnly spaces can kill ěščřž too signed.jnlp");
@@ -83,8 +81,6 @@
          * only on ocal files, and probably only from test run - it can be ignored
          */
         ServerAccess.ProcessResult pr =  ServerAccess.executeProcess(commands);
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s="Signed spaces can be everywhere.jsr was launched correctly";
         Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
         String cc = "xception";
@@ -97,11 +93,7 @@
     @Test
     @NeedsDisplay
     public void SpacesCanBeEverywhereRemoteAppletTestsJnlp2Signed() throws Exception {
-        System.out.println("connecting NotOnly spaces can kill ěščřž too signed.jnlp request");
-        System.err.println("connecting NotOnly spaces can kill ěščřž too signed.jnlp request");
         ServerAccess.ProcessResult pr = server.executeJavaws("/NotOnly%20spaces%20can%20kill%20%C4%9B%C5%A1%C4%8D%C5%99%C5%BE%20too%20signed.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s="Signed spaces can be everywhere.jsr was launched correctly";
         Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
         String cc = "xception";
@@ -113,11 +105,7 @@
     @Test
     @NeedsDisplay
     public void SpacesCanBeEverywhereRemoteAppletTestsHtml2Signed() throws Exception {
-        System.out.println("connecting spaces applet Tests signed.html request");
-        System.err.println("connecting spaces applet Tests signed.html request");
         ServerAccess.ProcessResult pr = server.executeBrowser("/spaces+applet+Tests+signed.html");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s="Signed spaces can be everywhere.jsr was launched correctly";
         Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
         String cc = "xception";
@@ -129,11 +117,7 @@
     @Bug(id={"PR811","http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-October/016144.html"})
     @Test
     public void SpacesCanBeEverywhereRemoteTests1Signed() throws Exception {
-        System.out.println("connecting SpacesCanBeEverywhereRemoteTests1 signed request");
-        System.err.println("connecting SpacesCanBeEverywhereRemoteTests1 signed request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/Spaces%20can%20be%20everywhere1%20signed.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s = "Good simple javaws exapmle";
         Assert.assertTrue("stdout should contains `" + s + "`, but did not", pr.stdout.contains(s));
         String cc = "ClassNotFoundException";
@@ -145,11 +129,7 @@
     @Bug(id="PR811")
     @Test
     public void SpacesCanBeEverywhereRemoteTests2Signed() throws Exception {
-        System.out.println("connecting SpacesCanBeEverywhereRemoteTests2 signed request");
-        System.err.println("connecting SpacesCanBeEverywhereRemoteTests2 signed request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/Spaces%20can%20be%20everywhere2%20signed.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s="Signed spaces can be everywhere.jsr was launched correctly";
         Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
         String cc = "ClassNotFoundException";
@@ -161,11 +141,7 @@
     @Bug(id="PR811")
     @Test
     public void SpacesCanBeEverywhereRemoteTests2Signed_withQuery1() throws Exception {
-        System.out.println("connecting SpacesCanBeEverywhereRemoteTests2 signed request");
-        System.err.println("connecting SpacesCanBeEverywhereRemoteTests2 signed request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/Spaces%20can%20be%20everywhere2%20signed.jnlp?test=20");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s="Signed spaces can be everywhere.jsr was launched correctly";
         Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
         String cc = "ClassNotFoundException";
@@ -177,11 +153,8 @@
      @Bug(id="PR811")
     @Test
     public void SpacesCanBeEverywhereRemoteTests2Signed_withQuery2() throws Exception {
-        System.out.println("connecting SpacesCanBeEverywhereRemoteTests2 signed request");
-        System.err.println("connecting SpacesCanBeEverywhereRemoteTests2 signed request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/Spaces%20can%20be%20everywhere2%20signed.jnlp?test%3D20");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
+
         String s="Signed spaces can be everywhere.jsr was launched correctly";
         Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
         String cc = "ClassNotFoundException";
@@ -193,11 +166,7 @@
     @Bug(id="PR811")
     @Test
     public void SpacesCanBeEverywhereRemoteTests3Signed() throws Exception {
-        System.out.println("connecting SpacesCanBeEverywhereRemoteTests3signed request");
-        System.err.println("connecting SpacesCanBeEverywhereRemoteTests3signed request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/SpacesCanBeEverywhere1signed.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s="Signed spaces can be everywhere.jsr was launched correctly";
         Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
         String cc = "ClassNotFoundException";
@@ -210,15 +179,11 @@
     @Bug(id="PR804")
     @Test
     public void SpacesCanBeEverywhereLocalTests1Signed() throws Exception {
-        System.out.println("connecting SpacesCanBeEverywhereLocalTests1 request");
-        System.err.println("connecting SpacesCanBeEverywhereLocalTests1 request");
         List<String> commands=new ArrayList<String>(4);
         commands.add(server.getJavawsLocation());
         commands.add(ServerAccess.HEADLES_OPTION);
         commands.add("Spaces can be everywhere1.jnlp");
         ServerAccess.ProcessResult pr = ServerAccess.executeProcess(commands,server.getDir());
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s = "Good simple javaws exapmle";
         Assert.assertTrue("stdout should contains `" + s + "`, but did not", pr.stdout.contains(s));
         String cc = "ClassNotFoundException";
@@ -230,15 +195,11 @@
     @Bug(id="PR804")
     @Test
     public void SpacesCanBeEverywhereLocalTests2Signed() throws Exception {
-        System.out.println("connecting SpacesCanBeEverywhereLocalTests2 signed request");
-        System.err.println("connecting SpacesCanBeEverywhereLocalTests2 signed request");
         List<String> commands=new ArrayList<String>(4);
         commands.add(server.getJavawsLocation());
         commands.add(ServerAccess.HEADLES_OPTION);
         commands.add("Spaces can be everywhere2 signed.jnlp");
         ServerAccess.ProcessResult pr = ServerAccess.executeProcess(commands,server.getDir());
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s="Signed spaces can be everywhere.jsr was launched correctly";
         Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
         String cc = "ClassNotFoundException";
@@ -250,15 +211,11 @@
     @Bug(id="PR804")
     @Test
     public void SpacesCanBeEverywhereLocalTests4Signed() throws Exception {
-        System.out.println("connecting SpacesCanBeEverywhereLocalTests2 signed request");
-        System.err.println("connecting SpacesCanBeEverywhereLocalTests2 signed request");
         List<String> commands=new ArrayList<String>(4);
         commands.add(server.getJavawsLocation());
         commands.add(ServerAccess.HEADLES_OPTION);
         commands.add(server.getDir()+"/Spaces can be everywhere2 signed.jnlp");
         ServerAccess.ProcessResult pr = ServerAccess.executeProcess(commands);
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s="Signed spaces can be everywhere.jsr was launched correctly";
         Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
         String cc = "ClassNotFoundException";
@@ -270,15 +227,11 @@
     @Bug(id="PR804")
     @Test
     public void SpacesCanBeEverywhereLocalTests3Signed() throws Exception {
-        System.out.println("connecting SpacesCanBeEverywhereLocalTests3signed request");
-        System.err.println("connecting SpacesCanBeEverywhereLocalTests3signed request");
         List<String> commands=new ArrayList<String>(4);
         commands.add(server.getJavawsLocation());
         commands.add(ServerAccess.HEADLES_OPTION);
         commands.add("SpacesCanBeEverywhere1signed.jnlp");
         ServerAccess.ProcessResult pr = ServerAccess.executeProcess(commands,server.getDir());
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s="Signed spaces can be everywhere.jsr was launched correctly";
         Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
         String cc = "ClassNotFoundException";
--- a/tests/jnlp_tests/simple/AccessClassInPackage/testcases/AccessClassInPackageTest.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/jnlp_tests/simple/AccessClassInPackage/testcases/AccessClassInPackageTest.java	Mon May 28 11:00:49 2012 +0200
@@ -101,11 +101,7 @@
 
     @Test
     public void AccessClassInPackageJAVAXJNLP() throws Exception {
-        System.out.println("AccessClassInPackageJAVAXJNLP");
-        System.err.println("AccessClassInPackageJAVAXJNLP");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + files[0]);
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         commonPitfall(pr);
         testShouldPass(pr, pass[0]);
         testShouldNOTFail(pr, badExceptions[0]);
@@ -113,11 +109,7 @@
 
     @Test
     public void AccessClassInPackageSELF() throws Exception {
-        System.out.println("AccessClassInPackageSELF");
-        System.err.println("AccessClassInPackageSELF");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + files[1]);
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         commonPitfall(pr);
         testShouldPass(pr, pass[1]);
         testShouldNOTFail(pr, badExceptions[1]);
@@ -125,11 +117,7 @@
 
     @Test
     public void AccessClassInPackageNETSF() throws Exception {
-        System.out.println("AccessClassInPackageNETSF");
-        System.err.println("AccessClassInPackageNETSF");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + files[2]);
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         commonPitfall(pr);
         testShouldFail(pr, badExceptions[2]);
         testShouldNOTPass(pr, pass[2]);
@@ -137,11 +125,7 @@
 
     @Test
     public void AccessClassInPackageSUNSEC() throws Exception {
-        System.out.println("AccessClassInPackageSUNSEC");
-        System.err.println("AccessClassInPackageSUNSEC");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + files[3]);
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         commonPitfall(pr);
         commonPitfall(pr);
         testShouldFail(pr, badExceptions[3]);
@@ -151,11 +135,7 @@
     //now signed vaiants
     @Test
     public void AccessClassInPackageSignedJAVAXJNLP() throws Exception {
-        System.out.println("AccessClassInPackageSignedJAVAXJNLP");
-        System.err.println("AccessClassInPackageSignedJAVAXJNLP");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(xta, "/" + filesSigned[0]);
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         commonPitfall(pr);
         testShouldPass(pr, pass[0]);
         testShouldNOTFail(pr, badExceptions[0]);
@@ -163,11 +143,7 @@
 
     @Test
     public void AccessClassInPackageSignedSELF() throws Exception {
-        System.out.println("AccessClassInPackageSignedSELF");
-        System.err.println("AccessClassInPackageSignedSELF");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(xta, "/" + filesSigned[1]);
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         commonPitfall(pr);
         testShouldPass(pr, pass[1]);
         testShouldNOTFail(pr, badExceptions[1]);
@@ -175,11 +151,7 @@
 
     @Test
     public void AccessClassInPackageSignedNETSF() throws Exception {
-        System.out.println("AccessClassInPackageSignedNETSF");
-        System.err.println("AccessClassInPackageSignedNETSF");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(xta, "/" + filesSigned[2]);
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         commonPitfall(pr);
         testShouldPass(pr, pass[2]);
         testShouldNOTFail(pr, badExceptions[2]);
@@ -187,11 +159,7 @@
 
     @Test
     public void AccessClassInPackageSignedSUNSEC() throws Exception {
-        System.out.println("AccessClassInPackageSignedSUNSEC");
-        System.err.println("AccessClassInPackageSignedSUNSEC");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(xta, "/" + filesSigned[3]);
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         commonPitfall(pr);
         testShouldPass(pr, pass[3]);
         testShouldNOTFail(pr, badExceptions[3]);
--- a/tests/jnlp_tests/simple/AddShutdownHook/testcases/AddShutdownHookTest.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/jnlp_tests/simple/AddShutdownHook/testcases/AddShutdownHookTest.java	Mon May 28 11:00:49 2012 +0200
@@ -46,11 +46,7 @@
 
     @Test
     public void AddShutdownHookTestLunch1() throws Exception {
-        System.out.println("connecting AddShutdownHook request");
-        System.err.println("connecting AddShutdownHook request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/AddShutdownHook.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s = "(?s).*java.security.AccessControlException.{0,5}access denied.{0,5}java.lang.RuntimePermission.{0,5}" + "shutdownHooks" + ".*";
         Assert.assertTrue("stderr should match "+s+" but didn't",pr.stderr.matches(s));
         String cc="ClassNotFoundException";
--- a/tests/jnlp_tests/simple/AllStackTraces/testcases/AllStackTracesTest.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/jnlp_tests/simple/AllStackTraces/testcases/AllStackTracesTest.java	Mon May 28 11:00:49 2012 +0200
@@ -48,11 +48,7 @@
 
     @Test
     public void AllStackTracesTest1() throws Exception {
-        System.out.println("connecting AllStackTraces request");
-        System.err.println("connecting AllStackTraces request");
         ServerAccess.ProcessResult pr=server.executeJavawsHeadless(null,"/AllStackTraces.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String c = "(?s).*java.security.AccessControlException.{0,5}access denied.{0,5}java.lang.RuntimePermission.{0,5}" + "getStackTrace" + ".*";
         Assert.assertTrue("stderr should match `"+c+"`, but didn't ",pr.stderr.matches(c));
         String cc="ClassNotFoundException";
--- a/tests/jnlp_tests/simple/AppletTest/testcases/AppletTestTests.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/jnlp_tests/simple/AppletTest/testcases/AppletTestTests.java	Mon May 28 11:00:49 2012 +0200
@@ -47,11 +47,7 @@
 
     @Test
     public void AppletTest() throws Exception {
-        System.out.println("connecting AppletTest request");
-        System.err.println("connecting AppletTest request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/AppletTest.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         evaluateApplet(pr);
         Assert.assertFalse(pr.wasTerminated);
         Assert.assertEquals((Integer) 0, pr.returnValue);
@@ -78,13 +74,9 @@
 
     @Test
     public void AppletInFirefoxTest() throws Exception {
-        System.out.println("connecting AppletInFirefoxTest request");
-        System.err.println("connecting AppletInFirefoxTest request");
         server.PROCESS_TIMEOUT = 30 * 1000;
         try {
             ServerAccess.ProcessResult pr = server.executeBrowser("/appletAutoTests.html");
-            System.out.println(pr.stdout);
-            System.err.println(pr.stderr);
             pr.process.destroy();
             evaluateApplet(pr);
             Assert.assertTrue(pr.wasTerminated);
--- a/tests/jnlp_tests/simple/CheckServices/testcases/CheckServicesTests.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/jnlp_tests/simple/CheckServices/testcases/CheckServicesTests.java	Mon May 28 11:00:49 2012 +0200
@@ -47,11 +47,7 @@
 
     @Test
     public void CheckServices() throws Exception {
-        System.out.println("connecting CheckServices request");
-        System.err.println("connecting CheckServices request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/CheckServices.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s0 = "Codebase for applet was found in constructor";
         Assert.assertTrue("CheckServices stdout should contain `" + s0 + "' bud didn't.", pr.stdout.contains(s0));
         String s1 = "Codebase for applet was found in init()";
--- a/tests/jnlp_tests/simple/CreateClassLoader/testcases/CreateClassLoaderTest.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/jnlp_tests/simple/CreateClassLoader/testcases/CreateClassLoaderTest.java	Mon May 28 11:00:49 2012 +0200
@@ -46,11 +46,7 @@
 
     @Test
     public void CreateClassLoaderLunch1() throws Exception {
-        System.out.println("connecting CreateClassLoader request");
-        System.err.println("connecting CreateClassLoader request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/CreateClassLoader.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s = "(?s).*java.security.AccessControlException.{0,5}access denied.{0,5}java.lang.RuntimePermission.{0,5}" + "createClassLoader" + ".*";
         Assert.assertTrue("Stderr should match "+s+" but didn't",pr.stderr.matches(s));
         String cc="ClassNotFoundException";
--- a/tests/jnlp_tests/simple/InformationTitleVendorParser/testcases/InformationTitleVendorParserTest.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/jnlp_tests/simple/InformationTitleVendorParser/testcases/InformationTitleVendorParserTest.java	Mon May 28 11:00:49 2012 +0200
@@ -45,11 +45,7 @@
     private static ServerAccess server = new ServerAccess();
 
     public void runTest(String jnlpName, String exceptionMessage) throws Exception {
-        System.out.println("connecting InformationTitleVendorParser request, testing " + jnlpName);
-        System.err.println("connecting InformationTitleVendorParser request, testing " + jnlpName);
         ServerAccess.ProcessResult pr=server.executeJavawsHeadless(null,"/" + jnlpName + ".jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s1 = "Good simple javaws exapmle";
         Assert.assertFalse("test" + jnlpName + " stdout should not contain " + s1 + " but did.", pr.stdout.contains(s1));
         // Looking for "Could not read or parse the JNLP file. (${DESCRIPTION})"
--- a/tests/jnlp_tests/simple/ManifestedJar1/testcases/ManifestedJar1Test.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/jnlp_tests/simple/ManifestedJar1/testcases/ManifestedJar1Test.java	Mon May 28 11:00:49 2012 +0200
@@ -85,11 +85,7 @@
      */
     public void manifestedJar1nothing2nothingNoAppDesc() throws Exception {
         String id = "ManifestedJar-1nothing2nothingNoAppDesc";
-        System.out.println("connecting " + id + " request");
-        System.err.println("connecting " + id + " request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         assertManifestedJar1(id, pr);
         assertNotDead(id, pr);
     }
@@ -101,11 +97,7 @@
     @Test
     public void manifestedJar1noAppDesc() throws Exception {
         String id = "ManifestedJar-1noAppDesc";
-        System.out.println("connecting " + id + " request");
-        System.err.println("connecting " + id + " request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         assertManifestedJar1(id, pr);
         assertNotDead(id, pr);
     }
@@ -117,11 +109,7 @@
     @Test
     public void manifestedJar1mainNoAppDesc() throws Exception {
         String id = "ManifestedJar-1mainNoAppDesc";
-        System.out.println("connecting " + id + " request");
-        System.err.println("connecting " + id + " request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         assertManifestedJar1(id, pr);
         assertNotDead(id, pr);
     }
@@ -133,11 +121,7 @@
     @Test
     public void ManifestedJar1mainHaveAppDesc() throws Exception {
         String id = "ManifestedJar-1mainHaveAppDesc";
-        System.out.println("connecting " + id + " request");
-        System.err.println("connecting " + id + " request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         assertManifestedJar2(id, pr);
         assertNotDead(id, pr);
     }
@@ -149,11 +133,7 @@
     @Test
     public void ManifestedJar1main2nothingNoAppDesc() throws Exception {
         String id = "ManifestedJar-1main2nothingNoAppDesc";
-        System.out.println("connecting " + id + " request");
-        System.err.println("connecting " + id + " request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         assertManifestedJar2(id, pr);
         assertNotDead(id, pr);
     }
@@ -165,11 +145,7 @@
     @Test
     public void manifestedJar1main2nothingNoAppDesc() throws Exception {
         String id = "ManifestedJar-1main2nothingNoAppDesc";
-        System.out.println("connecting " + id + " request");
-        System.err.println("connecting " + id + " request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         assertManifestedJar2(id, pr);
         assertNotDead(id, pr);
     }
@@ -184,11 +160,7 @@
     @Test
     public void manifestedJar1main2mainNoAppDesc() throws Exception {
         String id = "ManifestedJar-1main2mainNoAppDesc";
-        System.out.println("connecting " + id + " request");
-        System.err.println("connecting " + id + " request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         assertManifestedJar1(id, pr);
         assertNotDead(id, pr);
     }
@@ -202,11 +174,7 @@
     @Test
     public void manifestedJar1main2mainAppDesc() throws Exception {
         String id = "ManifestedJar-1main2mainAppDesc";
-        System.out.println("connecting " + id + " request");
-        System.err.println("connecting " + id + " request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         assertNotManifestedJar1(id, pr);
         assertNotManifestedJar2(id, pr);
         assertNotDead(id, pr);
@@ -221,11 +189,7 @@
     @Test
     public void manifestedJar1noAppDescAtAll() throws Exception {
         String id = "ManifestedJar-1noAppDescAtAll";
-        System.out.println("connecting " + id + " request");
-        System.err.println("connecting " + id + " request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         assertNotManifestedJar1(id, pr);
         assertNotManifestedJar2(id, pr);
         assertAppError(id, pr);
@@ -244,11 +208,7 @@
     @Test
     public void manifestedJar1nothing2nothingAppDesc() throws Exception {
         String id = "ManifestedJar-1nothing2nothingAppDesc";
-        System.out.println("connecting " + id + " request");
-        System.err.println("connecting " + id + " request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         assertNotManifestedJar2(id, pr);
         assertNotManifestedJar1(id, pr);
         assertNotDead(id, pr);
--- a/tests/jnlp_tests/simple/ReadEnvironment/testcases/ReadEnvironmentTest.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/jnlp_tests/simple/ReadEnvironment/testcases/ReadEnvironmentTest.java	Mon May 28 11:00:49 2012 +0200
@@ -46,11 +46,7 @@
 
     @Test
     public void ReadEnvironmentLunch1() throws Exception {
-        System.out.println("connecting ReadEnvironment request");
-        System.err.println("connecting ReadEnvironment request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/ReadEnvironment.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s = "(?s).*java.security.AccessControlException.{0,5}access denied.{0,5}java.lang.RuntimePermission.{0,5}" + "getenv.USER" + ".*";
         Assert.assertTrue("stderr should match"+s+"but didn't",pr.stderr.matches(s));
         String cc="ClassNotFoundException";
--- a/tests/jnlp_tests/simple/ReadProperties/testcases/ReadPropertiesTest.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/jnlp_tests/simple/ReadProperties/testcases/ReadPropertiesTest.java	Mon May 28 11:00:49 2012 +0200
@@ -47,11 +47,7 @@
  
     @Test
     public void ReadPropertiesLunch1() throws Exception {
-        System.out.println("connecting ReadProperties1 request");
-        System.err.println("connecting ReadProperties1 request");
         ServerAccess.ProcessResult pr=server.executeJavawsHeadless(null,"/ReadProperties1.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s = "(?s).*java.security.AccessControlException.{0,5}access denied.{0,5}java.util.PropertyPermission.{0,5}" + "user.name.{0,5}read" + ".*";
         Assert.assertTrue("stderr should match "+s+" but didn't",pr.stderr.matches(s));
         String cc="ClassNotFoundException";
@@ -63,11 +59,7 @@
 
     @Test
     public void ReadPropertiesLunch2() throws Exception {
-        System.out.println("connecting ReadProperties2 request");
-        System.err.println("connecting ReadProperties2 request");
         ServerAccess.ProcessResult pr=server.executeJavawsHeadless(null,"/ReadProperties2.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s = "(?s).*java.security.AccessControlException.{0,5}access denied.{0,5}java.util.PropertyPermission.{0,5}" + "user.home.{0,5}read" + ".*";
         Assert.assertTrue("stderr should match "+s+" but didn't",pr.stderr.matches(s));
         String cc="ClassNotFoundException";
--- a/tests/jnlp_tests/simple/RedirectStreams/testcases/RedirectStreamsTest.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/jnlp_tests/simple/RedirectStreams/testcases/RedirectStreamsTest.java	Mon May 28 11:00:49 2012 +0200
@@ -45,11 +45,7 @@
 
     @Test
     public void RedirectStreamsTest1() throws Exception {
-        System.out.println("connecting RedirectStreams request");
-        System.err.println("connecting RedirectStreams request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/RedirectStreams.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s = "(?s).*java.security.AccessControlException.{0,5}access denied.{0,5}java.lang.RuntimePermission.{0,5}" + "setIO" + ".*";
         Assert.assertTrue("Stderr should match "+s+" but didn't",pr.stderr.matches(s));
         String cc="ClassNotFoundException";
--- a/tests/jnlp_tests/simple/ReplaceSecurityManager/testcases/ReplaceSecurityManagerTest.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/jnlp_tests/simple/ReplaceSecurityManager/testcases/ReplaceSecurityManagerTest.java	Mon May 28 11:00:49 2012 +0200
@@ -45,11 +45,7 @@
 
     @Test
     public void ReplaceSecurityManagerLunch1() throws Exception {
-        System.out.println("connecting ReplaceSecurityManager request");
-        System.err.println("connecting ReplaceSecurityManager request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/ReplaceSecurityManager.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s = "(?s).*java.security.AccessControlException.{0,5}access denied.{0,5}java.lang.RuntimePermission.{0,5}" + "setSecurityManager" + ".*";
         Assert.assertTrue("stderr should match "+s+" but didn't",pr.stderr.matches(s));
         String cc="ClassNotFoundException";
--- a/tests/jnlp_tests/simple/SetContextClassLoader/testcases/SetContextClassLoaderTest.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/jnlp_tests/simple/SetContextClassLoader/testcases/SetContextClassLoaderTest.java	Mon May 28 11:00:49 2012 +0200
@@ -45,11 +45,7 @@
 
     @Test
     public void SetContextClassLoader1() throws Exception {
-        System.out.println("connecting SetContextClassLoader request");
-        System.err.println("connecting SetContextClassLoader request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/SetContextClassLoader.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s = "(?s).*java.security.AccessControlException.{0,5}access denied.{0,5}java.lang.RuntimePermission.{0,5}" + "setContextClassLoader" + ".*";
         Assert.assertTrue("stderr should match "+s+" but didn't",pr.stderr.matches(s));
         String cc="ClassNotFoundException";
--- a/tests/jnlp_tests/simple/Spaces can be everywhere/testcases/SpacesCanBeEverywhereTests.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/jnlp_tests/simple/Spaces can be everywhere/testcases/SpacesCanBeEverywhereTests.java	Mon May 28 11:00:49 2012 +0200
@@ -53,8 +53,6 @@
     @Test
     @NeedsDisplay
     public void SpacesCanBeEverywhereLocalAppletTestsJnlp2() throws Exception {
-        System.out.println("connecting NotOnly spaces can kill ěščřž too.jnlp request");
-        System.err.println("connecting NotOnly spaces can kill ěščřž too.jnlp request");
         List<String> commands=new ArrayList<String>(1);
         commands.add(server.getJavawsLocation());
         commands.add(server.getDir()+"/NotOnly spaces can kill ěščřž too.jnlp");
@@ -83,8 +81,6 @@
          * only on ocal files, and probably only from test run - it can be ignored
          */
         ServerAccess.ProcessResult pr =  ServerAccess.executeProcess(commands);
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s="Spaces can be everywhere.jsr was launched correctly";
         Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
         String cc = "xception";
@@ -97,11 +93,7 @@
     @Test
     @NeedsDisplay
     public void SpacesCanBeEverywhereRemoteAppletTestsJnlp2() throws Exception {
-        System.out.println("connecting NotOnly spaces can kill ěščřž too.jnlp request");
-        System.err.println("connecting NotOnly spaces can kill ěščřž too.jnlp request");
         ServerAccess.ProcessResult pr = server.executeJavaws("/NotOnly%20spaces%20can%20kill%20%C4%9B%C5%A1%C4%8D%C5%99%C5%BE%20too.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s="Spaces can be everywhere.jsr was launched correctly";
         Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
         String cc = "xception";
@@ -113,11 +105,7 @@
     @Test
     @NeedsDisplay
     public void SpacesCanBeEverywhereRemoteAppletTestsHtml2() throws Exception {
-        System.out.println("connecting spaces applet Tests.html request");
-        System.err.println("connecting spaces applet Tests.html request");
         ServerAccess.ProcessResult pr = server.executeBrowser("/spaces+applet+Tests.html");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s="Spaces can be everywhere.jsr was launched correctly";
         Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
         String cc = "xception";
@@ -129,11 +117,7 @@
     @Bug(id={"PR811","http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-October/016144.html"})
     @Test
     public void SpacesCanBeEverywhereRemoteTests1() throws Exception {
-        System.out.println("connecting SpacesCanBeEverywhereRemoteTests1 request");
-        System.err.println("connecting SpacesCanBeEverywhereRemoteTests1 request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/Spaces%20can%20be%20everywhere1.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s = "Good simple javaws exapmle";
         Assert.assertTrue("stdout should contains `" + s + "`, but did not", pr.stdout.contains(s));
         String cc = "ClassNotFoundException";
@@ -145,11 +129,7 @@
     @Bug(id="PR811")
     @Test
     public void SpacesCanBeEverywhereRemoteTests2() throws Exception {
-        System.out.println("connecting SpacesCanBeEverywhereRemoteTests2 request");
-        System.err.println("connecting SpacesCanBeEverywhereRemoteTests2 request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/Spaces%20can%20be%20everywhere2.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s="Spaces can be everywhere.jsr was launched correctly";
         Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
         String cc = "ClassNotFoundException";
@@ -161,11 +141,7 @@
     @Bug(id="PR811")
     @Test
     public void SpacesCanBeEverywhereRemoteTests2_withQuery1() throws Exception {
-        System.out.println("connecting SpacesCanBeEverywhereRemoteTests2 request");
-        System.err.println("connecting SpacesCanBeEverywhereRemoteTests2 request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/Spaces%20can%20be%20everywhere2.jnlp?test=10");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s="Spaces can be everywhere.jsr was launched correctly";
         Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
         String cc = "ClassNotFoundException";
@@ -178,11 +154,7 @@
     @Bug(id="PR811")
     @Test
     public void SpacesCanBeEverywhereRemoteTests2_withQuery2() throws Exception {
-        System.out.println("connecting SpacesCanBeEverywhereRemoteTests2 request");
-        System.err.println("connecting SpacesCanBeEverywhereRemoteTests2 request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/Spaces%20can%20be%20everywhere2.jnlp?test%3D10");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s="Spaces can be everywhere.jsr was launched correctly";
         Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
         String cc = "ClassNotFoundException";
@@ -194,11 +166,7 @@
     @Bug(id="PR811")
     @Test
     public void SpacesCanBeEverywhereRemoteTests3() throws Exception {
-        System.out.println("connecting SpacesCanBeEverywhereRemoteTests3 request");
-        System.err.println("connecting SpacesCanBeEverywhereRemoteTests3 request");
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/SpacesCanBeEverywhere1.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s="Spaces can be everywhere.jsr was launched correctly";
         Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
         String cc = "ClassNotFoundException";
@@ -211,15 +179,11 @@
     @Bug(id="PR804")
     @Test
     public void SpacesCanBeEverywhereLocalTests1() throws Exception {
-        System.out.println("connecting SpacesCanBeEverywhereLocalTests1 request");
-        System.err.println("connecting SpacesCanBeEverywhereLocalTests1 request");
         List<String> commands=new ArrayList<String>(4);
         commands.add(server.getJavawsLocation());
         commands.add(ServerAccess.HEADLES_OPTION);
         commands.add("Spaces can be everywhere1.jnlp");
         ServerAccess.ProcessResult pr = ServerAccess.executeProcess(commands,server.getDir());
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s = "Good simple javaws exapmle";
         Assert.assertTrue("stdout should contains `" + s + "`, but did not", pr.stdout.contains(s));
         String cc = "ClassNotFoundException";
@@ -231,15 +195,11 @@
     @Bug(id="PR804")
     @Test
     public void SpacesCanBeEverywhereLocalTests2() throws Exception {
-        System.out.println("connecting SpacesCanBeEverywhereLocalTests2 request");
-        System.err.println("connecting SpacesCanBeEverywhereLocalTests2 request");
         List<String> commands=new ArrayList<String>(4);
         commands.add(server.getJavawsLocation());
         commands.add(ServerAccess.HEADLES_OPTION);
         commands.add("Spaces can be everywhere2.jnlp");
         ServerAccess.ProcessResult pr = ServerAccess.executeProcess(commands,server.getDir());
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s="Spaces can be everywhere.jsr was launched correctly";
         Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
         String cc = "ClassNotFoundException";
@@ -251,15 +211,11 @@
     @Bug(id="PR804")
     @Test
     public void SpacesCanBeEverywhereLocalTests4() throws Exception {
-        System.out.println("connecting SpacesCanBeEverywhereLocalTests2 request");
-        System.err.println("connecting SpacesCanBeEverywhereLocalTests2 request");
         List<String> commands=new ArrayList<String>(4);
         commands.add(server.getJavawsLocation());
         commands.add(ServerAccess.HEADLES_OPTION);
         commands.add(server.getDir()+"/Spaces can be everywhere2.jnlp");
         ServerAccess.ProcessResult pr = ServerAccess.executeProcess(commands);
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s="Spaces can be everywhere.jsr was launched correctly";
         Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
         String cc = "ClassNotFoundException";
@@ -271,15 +227,11 @@
     @Bug(id="PR804")
     @Test
     public void SpacesCanBeEverywhereLocalTests3() throws Exception {
-        System.out.println("connecting SpacesCanBeEverywhereLocalTests3 request");
-        System.err.println("connecting SpacesCanBeEverywhereLocalTests3 request");
         List<String> commands=new ArrayList<String>(4);
         commands.add(server.getJavawsLocation());
         commands.add(ServerAccess.HEADLES_OPTION);
         commands.add("SpacesCanBeEverywhere1.jnlp");
         ServerAccess.ProcessResult pr = ServerAccess.executeProcess(commands,server.getDir());
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s="Spaces can be everywhere.jsr was launched correctly";
         Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
         String cc = "ClassNotFoundException";
--- a/tests/jnlp_tests/simple/deadlocktest/testcases/DeadLockTestTest.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/jnlp_tests/simple/deadlocktest/testcases/DeadLockTestTest.java	Mon May 28 11:00:49 2012 +0200
@@ -55,7 +55,7 @@
 
     @BeforeClass
     public static void printJavas() throws Exception {
-        System.out.println("Currently runnng javas1 " + countJavaInstances());
+        ServerAccess.logOutputReprint("Currently runnng javas1 " + countJavaInstances());
 
     }
 
@@ -71,15 +71,11 @@
 
     public void testDeadLockTestTerminatedBody(String jnlp) throws Exception {
         List<String> before = countJavaInstances();
-        System.out.println("java1 "+jnlp+" : " + before.size());
-        System.out.println("connecting " + jnlp + " request");
-        System.err.println("connecting " + jnlp + " request");
+        ServerAccess.logOutputReprint("java1 "+jnlp+" : " + before.size());
         ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, jnlp);
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         assertDeadlockTestLaunched(pr);
         List<String> after = countJavaInstances();
-        System.out.println("java2 "+jnlp+" : " + after.size());
+        ServerAccess.logOutputReprint("java2 "+jnlp+" : " + after.size());
         String ss="This process is hanging more than 30s. Should be killed";
         Assert.assertFalse("stdout shoud not contains: "+ss+", but did",pr.stdout.contains(ss));
 //        Assert.assertTrue(pr.stderr.contains("xception"));, exception is thrown by engine,not by application
@@ -87,7 +83,7 @@
         Assert.assertEquals(null, pr.returnValue);//killed process have no value
         killDiff(before, after);
         List<String> afterKill = countJavaInstances();
-        System.out.println("java3 "+jnlp+" : " + afterKill.size());
+        ServerAccess.logOutputReprint("java3 "+jnlp+" : " + afterKill.size());
         Assert.assertEquals("assert that just old javas remians", 0, (before.size() - afterKill.size()));
     }
 
@@ -99,25 +95,21 @@
 
     @Test
     public void testSimpletest1lunchFork() throws Exception {
-        System.out.println("connecting " + deadlocktest_1 + " request");
-        System.err.println("connecting " + deadlocktest_1 + " request");
         List<String> before = countJavaInstances();
-        System.out.println("java4: " + before.size());
+        ServerAccess.logOutputReprint("java4: " + before.size());
         BackgroundDeadlock bd = new BackgroundDeadlock(deadlocktest_1, null);
         bd.start();
         Thread.sleep(ServerAccess.PROCESS_TIMEOUT * 2 / 3);
         List<String> during = countJavaInstances();
-        System.out.println("java5: " + during.size());
+        ServerAccess.logOutputReprint("java5: " + during.size());
         waitForBackgroundDeadlock(bd);
         List<String> after = countJavaInstances();
-        System.out.println("java6: " + after.size());
+        ServerAccess.logOutputReprint("java6: " + after.size());
         Assert.assertNotNull("proces inside background deadlock cant be null. It was.", bd.getPr());
-        System.out.println(bd.getPr().stdout);
-        System.err.println(bd.getPr().stderr);
         assertDeadlockTestLaunched(bd.getPr());
         killDiff(before, during);
         List<String> afterKill = countJavaInstances();
-        System.out.println("java66: " + afterKill.size());
+        ServerAccess.logOutputReprint("java66: " + afterKill.size());
         Assert.assertEquals("assert that just old javas remians", 0, (before.size() - afterKill.size()));
         // div by two is caused by jav in java process hierarchy
         Assert.assertEquals("launched JVMs must be exactly 2, was " + (during.size() - before.size()) / 2, 2, (during.size() - before.size()) / 2);
@@ -125,25 +117,21 @@
 
     @Test
     public void testSimpletest1lunchNoFork() throws Exception {
-        System.out.println("connecting " + deadlocktest_1 + " Xnofork request");
-        System.err.println("connecting " + deadlocktest_1 + " Xnofork request");
         List<String> before = countJavaInstances();
-        System.out.println("java7: " + before.size());
+        ServerAccess.logOutputReprint("java7: " + before.size());
         BackgroundDeadlock bd = new BackgroundDeadlock(deadlocktest_1, Arrays.asList(new String[]{"-Xnofork"}));
         bd.start();
         Thread.sleep(ServerAccess.PROCESS_TIMEOUT * 2 / 3);
         List<String> during = countJavaInstances();
-        System.out.println("java8: " + during.size());
+        ServerAccess.logOutputReprint("java8: " + during.size());
         waitForBackgroundDeadlock(bd);
         List<String> after = countJavaInstances();
-        System.out.println("java9: " + after.size());
+        ServerAccess.logOutputReprint("java9: " + after.size());
         Assert.assertNotNull("proces inside background deadlock cant be null. It was.", bd.getPr());
-        System.out.println(bd.getPr().stdout);
-        System.err.println(bd.getPr().stderr);
         assertDeadlockTestLaunched(bd.getPr());
         killDiff(before, during);
         List<String> afterKill = countJavaInstances();
-        System.out.println("java99: " + afterKill.size());
+        ServerAccess.logOutputReprint("java99: " + afterKill.size());
         Assert.assertEquals("assert that just old javas remians", 0, (before.size() - afterKill.size()));
         // div by two is caused by jav in java process hierarchy
         Assert.assertEquals("launched JVMs must be exactly 1, was  " + (during.size() - before.size()) / 2, 1, (during.size() - before.size()) / 2);
@@ -168,12 +156,15 @@
             if (old.contains(string)) {
                 continue;
             }
-            System.out.println("Killing " + string);
-            ServerAccess.ProcessResult pr = ServerAccess.executeProcess(Arrays.asList(new String[]{"kill", "-9", string}));
+            ServerAccess.logOutputReprint("Killing " + string);
+            ServerAccess.PROCESS_LOG = false;
+            try {
+                ServerAccess.ProcessResult pr = ServerAccess.executeProcess(Arrays.asList(new String[]{"kill", "-9", string}));
+            } finally {
+                ServerAccess.PROCESS_LOG = true;
+            }
             result.add(string);
-            //System.out.println(pr.stdout);
-            // System.err.println(pr.stderr);
-            System.out.println("Killed " + string);
+            ServerAccess.logOutputReprint("Killed " + string);
         }
         return result;
     }
@@ -181,23 +172,26 @@
     private static List<String> countJavaInstances() throws Exception {
         ensureLinux();
         List<String> result = new ArrayList<String>();
-        ServerAccess.ProcessResult pr = ServerAccess.executeProcess(Arrays.asList(new String[]{"ps", "-eo", "pid,ppid,stat,fname"}));
-        Matcher m = Pattern.compile("\\s*\\d+\\s+\\d+ .+ java\\s*").matcher(pr.stdout);
-        //System.out.println(pr.stdout);
-        //System.err.println(pr.stderr);
-        int i = 0;
-        while (m.find()) {
-            i++;
-            String ss = m.group();
-            //System.out.println(i+": "+ss);
-            result.add(ss.trim().split("\\s+")[0]);
+        ServerAccess.PROCESS_LOG = false;
+        try {
+            ServerAccess.ProcessResult pr = ServerAccess.executeProcess(Arrays.asList(new String[]{"ps", "-eo", "pid,ppid,stat,fname"}));
+            Matcher m = Pattern.compile("\\s*\\d+\\s+\\d+ .+ java\\s*").matcher(pr.stdout);
+            int i = 0;
+            while (m.find()) {
+                i++;
+                String ss = m.group();
+                //ServerAccess.logOutputReprint(i+": "+ss);
+                result.add(ss.trim().split("\\s+")[0]);
+            }
+        } finally {
+            ServerAccess.PROCESS_LOG = true;
         }
         return result;
 
     }
 
     public static void main(String[] args) throws Exception {
-        System.out.println(countJavaInstances());
+        ServerAccess.logOutputReprint(""+countJavaInstances());
     }
 
     private void assertDeadlockTestLaunched(ProcessResult pr) {
--- a/tests/jnlp_tests/simple/simpletest1/testcases/SimpleTest1Test.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/jnlp_tests/simple/simpletest1/testcases/SimpleTest1Test.java	Mon May 28 11:00:49 2012 +0200
@@ -49,11 +49,7 @@
 
     @Test
     public void testSimpletest1lunchOk() throws Exception {
-        System.out.println("connecting simpletest1 request");
-        System.err.println("connecting simpletest1 request");
         ServerAccess.ProcessResult pr=server.executeJavawsHeadless(null,"/simpletest1.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         String s="Good simple javaws exapmle";
         Assert.assertTrue("testSimpletest1lunchOk stdout should contains "+s+" bud didn't",pr.stdout.contains(s));
         String ss="xception";
@@ -62,8 +58,4 @@
         Assert.assertEquals((Integer)0, pr.returnValue);
     }
 
-  
-
-
-
-    }
+ }
--- a/tests/jnlp_tests/simple/simpletest2/testcases/SimpleTest2Test.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/jnlp_tests/simple/simpletest2/testcases/SimpleTest2Test.java	Mon May 28 11:00:49 2012 +0200
@@ -47,11 +47,7 @@
 
     @Test
     public void testSimpletest2lunchException() throws Exception {
-        System.out.println("connecting simpletest2 request");
-        System.err.println("connecting simpletest2 request");
         ServerAccess.ProcessResult pr=server.executeJavawsHeadless(null,"/simpletest2.jnlp");
-        System.out.println(pr.stdout);
-        System.err.println(pr.stderr);
         Assert.assertTrue("stdout should be < 1 , but was "+pr.stdout.trim().length(),pr.stdout.trim().length() < 1);
         String s="Correct exception";
         Assert.assertTrue("stderr should contains "+s+" but didn't",pr.stderr.contains(s));
--- a/tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java	Mon May 28 11:00:49 2012 +0200
@@ -116,6 +116,10 @@
      * all terminated processes are stored here. As wee need to 'wait' to termination to be finished.
      */
     private static Set<Thread> terminated = new HashSet<Thread>();
+    /**
+     * this flag is indicating whether output of executeProcess should be logged. By default true.
+     */
+    public static boolean PROCESS_LOG = true;
 
     /**
      * main method of this class prints out random free port
@@ -720,9 +724,87 @@
         return executeProcess(args, dir, null, null);
     }
 
-     public static ProcessResult executeProcess(final List<String> args,File dir,ContentReaderListener stdoutl,ContentReaderListener stderrl) throws Exception {
+    private static String createConnectionMessage(ThreadedProcess t) {
+        return "Connecting " + t.getCommandLine();
+    }
+
+    /**
+     * Proceed message s to logging with request to reprint to System.err
+     * @param s
+     */
+    public static void logErrorReprint(String s) {
+        log(s, false, true);
+    }
+
+    /**
+     * Proceed message s to logging with request to reprint to System.out
+     * @param s
+     */
+    public static void logOutputReprint(String s) {
+        log(s, true, false);
+    }
+
+    /**
+     * Proceed message s to logging withhout request to reprint
+     * @param s
+     */
+    public static void logNoReprint(String s) {
+        log(s, false, false);
+    }
+
+    private static void log(String message, boolean printToOut, boolean printToErr) {
+        String idded;
+        StackTraceElement ste = getTestMethod();
+        String fullId = ste.getClassName() + "." + ste.getMethodName();
+        if (message.contains("\n")) {
+            idded = fullId + ": \n" + message + "\n" + fullId + " ---";
+        } else {
+            idded = fullId + ": " + message;
 
-        ThreadedProcess t = new ThreadedProcess(args,dir);
+        }
+        if (printToOut) {
+            System.out.println(idded);
+        }
+        if (printToErr) {
+            System.err.println(idded);
+        }
+    }
+
+    private static StackTraceElement getTestMethod() {
+        return getTestMethod(Thread.currentThread().getStackTrace());
+    }
+
+    private static StackTraceElement getTestMethod(StackTraceElement[] stack) {
+        //0 is always thread
+        //1 is net.sourceforge.jnlp.ServerAccess
+        StackTraceElement result = stack[1];
+        String baseClass = stack[1].getClassName();
+        int i = 2;
+        for (; i < stack.length; i++) {
+            result = stack[i];//at least moving up
+            if (!baseClass.equals(stack[i].getClassName())) {
+                break;
+            }
+        }
+        //now we are out of net.sourceforge.jnlp.ServerAccess
+        //method we need (the test)  is highest from following class
+        baseClass = stack[i].getClassName();
+        for (; i < stack.length; i++) {
+            if (!baseClass.equals(stack[i].getClassName())) {
+                break;
+            }
+            result = stack[i];
+        }
+
+        return result;
+    }
+
+    public static ProcessResult executeProcess(final List<String> args, File dir, ContentReaderListener stdoutl, ContentReaderListener stderrl) throws Exception {
+        ThreadedProcess t = new ThreadedProcess(args, dir);
+        if (PROCESS_LOG) {
+            String connectionMesaage = createConnectionMessage(t);
+            log(connectionMesaage, true, true);
+        }
         ProcessAssasin pa = new ProcessAssasin(t, PROCESS_TIMEOUT);
         pa.start();
         t.start();
@@ -753,7 +835,12 @@
         pa.setCanRun(false);
         // System.out.println(t.getP().exitValue()); when process is killed, this throws exception
 
-        return new ProcessResult(crs.getContent(), cre.getContent(), t.getP(), pa.wasTerminated(), t.getExitCode(), null);
+        ProcessResult pr=new ProcessResult(crs.getContent(), cre.getContent(), t.getP(), pa.wasTerminated(), t.getExitCode(), null);
+        if (PROCESS_LOG) {
+            log(pr.stdout, true, false);
+            log(pr.stderr, false, true);
+        }
+        return pr;
     }
 
     /**
--- a/tests/netx/unit/net/sourceforge/jnlp/cache/CacheLRUWrapperTest.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/netx/unit/net/sourceforge/jnlp/cache/CacheLRUWrapperTest.java	Mon May 28 11:00:49 2012 +0200
@@ -40,6 +40,7 @@
 import static org.junit.Assert.assertTrue;
 
 import java.io.File;
+import net.sourceforge.jnlp.ServerAccess;
 
 import net.sourceforge.jnlp.config.DeploymentConfiguration;
 import net.sourceforge.jnlp.runtime.JNLPRuntime;
@@ -90,7 +91,7 @@
         }
         
         double avg = sum / time.length;
-        System.err.println("Average = " + avg + "ns");
+        ServerAccess.logErrorReprint("Average = " + avg + "ns");
 
         // wait more than 100 microseconds for noLoops = 1000 and noEntries=1000 is bad
         assertTrue("load() must not take longer than 100 µs, but took in avg " + avg/1000 + "µs", avg < 100 * 1000);
--- a/tests/netx/unit/net/sourceforge/jnlp/runtime/CodeBaseClassLoaderTest.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/netx/unit/net/sourceforge/jnlp/runtime/CodeBaseClassLoaderTest.java	Mon May 28 11:00:49 2012 +0200
@@ -48,6 +48,7 @@
 import net.sourceforge.jnlp.ParseException;
 import net.sourceforge.jnlp.ResourcesDesc;
 import net.sourceforge.jnlp.SecurityDesc;
+import net.sourceforge.jnlp.ServerAccess;
 import net.sourceforge.jnlp.runtime.JNLPClassLoader;
 import net.sourceforge.jnlp.runtime.JNLPClassLoader.CodeBaseClassLoader;
 
@@ -86,13 +87,13 @@
         classLoader.findResource("net/sourceforge/jnlp/about/Main.class");
         stopTime = System.nanoTime();
         long timeOnFirstTry = stopTime - startTime;
-        System.err.println(timeOnFirstTry);
+        ServerAccess.logErrorReprint(""+timeOnFirstTry);
 
         startTime = System.nanoTime();
         classLoader.findResource("net/sourceforge/jnlp/about/Main.class");
         stopTime = System.nanoTime();
         long timeOnSecondTry = stopTime - startTime;
-        System.err.println(timeOnSecondTry);
+        ServerAccess.logErrorReprint(""+timeOnSecondTry);
 
         assertTrue(timeOnSecondTry < (timeOnFirstTry / 10));
     }
@@ -128,13 +129,13 @@
         classLoader.findResource("net/sourceforge/jnlp/about/Main_FOO_.class");
         stopTime = System.nanoTime();
         long timeOnFirstTry = stopTime - startTime;
-        System.err.println(timeOnFirstTry);
+        ServerAccess.logErrorReprint(""+timeOnFirstTry);
 
         startTime = System.nanoTime();
         classLoader.findResource("net/sourceforge/jnlp/about/Main_FOO_.class");
         stopTime = System.nanoTime();
         long timeOnSecondTry = stopTime - startTime;
-        System.err.println(timeOnSecondTry);
+        ServerAccess.logErrorReprint(""+timeOnSecondTry);
 
         assertTrue(timeOnSecondTry < (timeOnFirstTry / 10));
     }
--- a/tests/netx/unit/net/sourceforge/jnlp/util/replacements/BASE64EncoderTest.java	Fri May 25 11:44:13 2012 -0400
+++ b/tests/netx/unit/net/sourceforge/jnlp/util/replacements/BASE64EncoderTest.java	Mon May 28 11:00:49 2012 +0200
@@ -41,6 +41,7 @@
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.Arrays;
+import net.sourceforge.jnlp.ServerAccess;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -72,13 +73,13 @@
 //        sun.misc.BASE64Encoder e1 = new sun.misc.BASE64Encoder();
 //        e1.encode(data, out1);
 //        byte[] encoded1 = out1.toByteArray();
-//        System.out.println(Arrays.toString(encoded1));
+//        ServerAccess.logErrorReprint(Arrays.toString(encoded1));
         ByteArrayOutputStream out2 = new ByteArrayOutputStream();
         BASE64Encoder e2 = new BASE64Encoder();
         e2.encodeBuffer(data, out2);
         byte[] encoded2 = out2.toByteArray();
         Assert.assertArrayEquals(encoded, encoded2);
-//        System.out.println(Arrays.toString(encoded2));
+//      ServerAccess.logErrorReprint(Arrays.toString(encoded2));