You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yoko-commits@incubator.apache.org by br...@apache.org on 2007/03/16 15:57:04 UTC
svn commit: r519023 - in /incubator/yoko/trunk/bindings: pom.xml
src/test/java/org/apache/yoko/bindings/corba/CorbaTypeTest.java
src/test/java/org/apache/yoko/bindings/corba/ServerLauncher.java
src/test/resources/logging.properties
Author: bravi
Date: Fri Mar 16 08:57:03 2007
New Revision: 519023
URL: http://svn.apache.org/viewvc?view=rev&rev=519023
Log:
[YOKO-245] - Turning on some DEBUG info for the failing tests in continuum & also removed the cxf logging info from the test output.
Added:
incubator/yoko/trunk/bindings/src/test/resources/logging.properties (with props)
Modified:
incubator/yoko/trunk/bindings/pom.xml
incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaTypeTest.java
incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/ServerLauncher.java
Modified: incubator/yoko/trunk/bindings/pom.xml
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/pom.xml?view=diff&rev=519023&r1=519022&r2=519023
==============================================================================
--- incubator/yoko/trunk/bindings/pom.xml (original)
+++ incubator/yoko/trunk/bindings/pom.xml Fri Mar 16 08:57:03 2007
@@ -346,6 +346,15 @@
<name>java.endorsed.dirs</name>
<value>${basedir}/target/endorsed</value>
</property>
+ <!-- To check the error in continuum -->
+ <property>
+ <name>DEBUG</name>
+ <value>true</value>
+ </property>
+ <property>
+ <name>java.util.logging.config.file</name>
+ <value>${basedir}/target/test-classes/logging.properties</value>
+ </property>
</systemProperties>
</configuration>
</plugin>
Modified: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaTypeTest.java?view=diff&rev=519023&r1=519022&r2=519023
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaTypeTest.java (original)
+++ incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaTypeTest.java Fri Mar 16 08:57:03 2007
@@ -70,10 +70,11 @@
public CorbaTypeTestSetup(Test tester) {
super(tester);
boolean startServer = !Boolean.getBoolean("NO_SERVER_START");
+ boolean debug = Boolean.getBoolean("DEBUG");
if (startServer) {
java.util.Map<String, String> properties = new java.util.HashMap<String, String>();
properties.put("java.endorsed.dirs", System.getProperty("java.endorsed.dirs"));
- sl = new ServerLauncher(CorbaTypeTestServer.class.getName(), properties, null);
+ sl = new ServerLauncher(CorbaTypeTestServer.class.getName(), properties, null, debug);
}
}
Modified: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/ServerLauncher.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/ServerLauncher.java?view=diff&rev=519023&r1=519022&r2=519023
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/ServerLauncher.java (original)
+++ incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/ServerLauncher.java Fri Mar 16 08:57:03 2007
@@ -46,7 +46,7 @@
final String className;
- private final boolean debug = false;
+ private boolean debug = false;
private final String javaExe;
private Process process;
@@ -64,10 +64,15 @@
}
public ServerLauncher(String theClassName, Map<String, String> p, String[] args) {
+ this(theClassName, p, args, false);
+ }
+
+ public ServerLauncher(String theClassName, Map<String, String> p, String[] args, boolean debugMode) {
className = theClassName;
properties = p;
serverArgs = args;
javaExe = System.getProperty("java.home") + File.separator + "bin" + File.separator + "java";
+ debug = debugMode;
}
private boolean waitForServerToStop() {
@@ -119,7 +124,7 @@
List<String> cmd = getCommand();
if (debug) {
- System.err.print("CMD: ");
+ System.out.println("CMD: " + cmd);
}
@@ -173,6 +178,9 @@
try {
StringBuilder serverOutput = new StringBuilder();
String outputDir = System.getProperty("server.output.dir", "target/surefire-reports/");
+ if (debug) {
+ System.out.println("Running Output Monitor Thread... " + outputDir);
+ }
FileOutputStream fos;
try {
fos = new FileOutputStream(outputDir + className + ".out");
@@ -186,10 +194,10 @@
boolean running = true;
for (int ch = in.read(); ch != -1; ch = in.read()) {
serverOutput.append((char)ch);
- if (debug) {
- System.err.print((char)ch);
- }
String s = serverOutput.toString();
+ if (debug) {
+ System.out.println("Server Output: " + s);
+ }
if (s.contains("server ready")) {
notifyServerIsReady();
} else if (s.contains("server passed")) {
Added: incubator/yoko/trunk/bindings/src/test/resources/logging.properties
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/resources/logging.properties?view=auto&rev=519023
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/resources/logging.properties (added)
+++ incubator/yoko/trunk/bindings/src/test/resources/logging.properties Fri Mar 16 08:57:03 2007
@@ -0,0 +1,75 @@
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#
+
+############################################################
+# Default Logging Configuration File
+#
+# You can use a different file by specifying a filename
+# with the java.util.logging.config.file system property.
+# For example java -Djava.util.logging.config.file=myfile
+############################################################
+
+############################################################
+# Global properties
+############################################################
+
+# "handlers" specifies a comma separated list of log Handler
+# classes. These handlers will be installed during VM startup.
+# Note that these classes must be on the system classpath.
+# By default we only configure a ConsoleHandler, which will only
+# show messages at the INFO and above levels.
+handlers= java.util.logging.ConsoleHandler
+
+# To also add the FileHandler, use the following line instead.
+#handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
+
+# Default global logging level.
+# This specifies which kinds of events are logged across
+# all loggers. For any given facility this global level
+# can be overriden by a facility specific level
+# Note that the ConsoleHandler also has a separate level
+# setting to limit messages printed to the console.
+.level= SEVERE
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+# default file output is in user's home directory.
+java.util.logging.FileHandler.pattern = %h/java%u.log
+java.util.logging.FileHandler.limit = 50000
+java.util.logging.FileHandler.count = 1
+java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
+
+# Limit the message that are printed on the console to INFO and above.
+java.util.logging.ConsoleHandler.level = SEVERE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+
+############################################################
+# Facility specific properties.
+# Provides extra control for each logger.
+############################################################
+
+# For example, set the com.xyz.foo logger to only log SEVERE
+# messages:
+com.xyz.foo.level = SEVERE
Propchange: incubator/yoko/trunk/bindings/src/test/resources/logging.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/yoko/trunk/bindings/src/test/resources/logging.properties
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/yoko/trunk/bindings/src/test/resources/logging.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain