Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 93914D890 for ; Fri, 17 Aug 2012 18:28:44 +0000 (UTC) Received: (qmail 40093 invoked by uid 500); 17 Aug 2012 18:28:44 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 40057 invoked by uid 500); 17 Aug 2012 18:28:44 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 40050 invoked by uid 99); 17 Aug 2012 18:28:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Aug 2012 18:28:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Aug 2012 18:28:41 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 52196238897F; Fri, 17 Aug 2012 18:27:57 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1374388 - in /camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote: FtpServerTestSupport.java FtpsServerTestSupport.java sftp/SftpServerTestSupport.java Date: Fri, 17 Aug 2012 18:27:57 -0000 To: commits@camel.apache.org From: bvahdat@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120817182757.52196238897F@eris.apache.org> Author: bvahdat Date: Fri Aug 17 18:27:56 2012 New Revision: 1374388 URL: http://svn.apache.org/viewvc?rev=1374388&view=rev Log: CAMEL-5514:: Warn both through console as well as log if we can not run a given test. Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpServerTestSupport.java camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpsServerTestSupport.java camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpServerTestSupport.java Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpServerTestSupport.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpServerTestSupport.java?rev=1374388&r1=1374387&r2=1374388&view=diff ============================================================================== --- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpServerTestSupport.java (original) +++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpServerTestSupport.java Fri Aug 17 18:27:56 2012 @@ -67,8 +67,12 @@ public abstract class FtpServerTestSuppo NoSuchAlgorithmException nsae = ObjectHelper.getException(NoSuchAlgorithmException.class, e); if (nsae != null) { canTest = false; + + // warn both through console as well as log that we can not run the test String name = System.getProperty("os.name"); - System.out.println("SunX509 is not avail on this platform [" + name + "] Testing is skipped! Real cause: " + nsae.getMessage()); + String message = nsae.getMessage(); + System.out.println("SunX509 is not avail on this platform [" + name + "] Testing is skipped! Real cause: " + message); + log.warn("SunX509 is not avail on this platform [{0}] Testing is skipped! Real cause: {1}", name, message); } else { // some other error then throw it so the test can fail throw e; Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpsServerTestSupport.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpsServerTestSupport.java?rev=1374388&r1=1374387&r2=1374388&view=diff ============================================================================== --- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpsServerTestSupport.java (original) +++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpsServerTestSupport.java Fri Aug 17 18:27:56 2012 @@ -45,15 +45,18 @@ public abstract class FtpsServerTestSupp // ignore if algorithm is not on the OS NoSuchAlgorithmException nsae = ObjectHelper.getException(NoSuchAlgorithmException.class, e); if (nsae != null) { + // warn both through console as well as log that we can not run the test String name = System.getProperty("os.name"); - System.out.println("SunX509 is not avail on this platform [" + name + "] Testing is skipped! Real cause: " + nsae.getMessage()); + String message = nsae.getMessage(); + System.out.println("SunX509 is not avail on this platform [" + name + "] Testing is skipped! Real cause: " + message); + log.warn("SunX509 is not avail on this platform [{0}] Testing is skipped! Real cause: {1}", name, message); + + return null; } else { // some other error then throw it so the test can fail throw e; } } - - return null; } protected FtpServerFactory doCreateFtpServerFactory() throws Exception { Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpServerTestSupport.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpServerTestSupport.java?rev=1374388&r1=1374387&r2=1374388&view=diff ============================================================================== --- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpServerTestSupport.java (original) +++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpServerTestSupport.java Fri Aug 17 18:27:56 2012 @@ -60,7 +60,12 @@ public class SftpServerTestSupport exten NoSuchAlgorithmException nsae = ObjectHelper.getException(NoSuchAlgorithmException.class, e); if (nsae != null) { canTest = false; - log.warn("SunX509 is not avail on this platform [{0}] Testing is skipped! Real cause: {1}", System.getProperty("os.name"), nsae.getMessage()); + + // warn both through console as well as log that we can not run the test + String name = System.getProperty("os.name"); + String message = nsae.getMessage(); + System.out.println("SunX509 is not avail on this platform [" + name + "] Testing is skipped! Real cause: " + message); + log.warn("SunX509 is not avail on this platform [{0}] Testing is skipped! Real cause: {1}", name, message); } else { // some other error then throw it so the test can fail throw e;