Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 14977 invoked from network); 4 Dec 2007 18:52:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Dec 2007 18:52:06 -0000 Received: (qmail 41056 invoked by uid 500); 4 Dec 2007 18:51:54 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 40845 invoked by uid 500); 4 Dec 2007 18:51:53 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 40834 invoked by uid 99); 4 Dec 2007 18:51:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Dec 2007 10:51:53 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Dec 2007 18:51:41 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2C07C714251 for ; Tue, 4 Dec 2007 10:51:44 -0800 (PST) Message-ID: <11789158.1196794304177.JavaMail.jira@brutus> Date: Tue, 4 Dec 2007 10:51:44 -0800 (PST) From: "Daniel John Debrunner (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Created: (DERBY-3248) SecureServerTest needs cleanup runServerCommand, possibly causing test failures when tests are run through ant. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org SecureServerTest needs cleanup runServerCommand, possibly causing test failures when tests are run through ant. --------------------------------------------------------------------------------------------------------------- Key: DERBY-3248 URL: https://issues.apache.org/jira/browse/DERBY-3248 Project: Derby Issue Type: Bug Components: Test Affects Versions: 10.4.0.0 Reporter: Daniel John Debrunner SecureServerTest.runServerCommand runs a command and then immediately creates a String based upon the output stream of the command. This string is then checked to see if it contains exception strings. However, I think that at the point the string is created there is no guarantee that the command has finished (or even started) execution. Thus there is a significant chance that the string will be empty (or at least missing exceptions) and thus always pass the test. Should the test be waiting for the command to complete using Process.waitFor(). In getProcessOutput the bytes are converted to a String using the default encoding, this tends to cause problems for platforms with different encodings in test runs. It may be ok here since the output is from the system, if so it would be useful to have a comment indicating that the default encoding is ok here. (to avoid other tests blindly copying potentially error prone (due to encoding issues)code). In runServerCommand() if the exec fails the exception is just printed to System.err. SHould this instead be a fail() assertion. The test will fail if this occurs due to a NPE on the next access of serverProcess, but I think an explicit fail() would be more readable. I'm seeing 9 test failures when running derbynet._Suite through ant, on windows which I don't see if I run it directly using the swing test runner. This is one of the two tests that potentially cause issues (ie. removing it from the suite makes the failures disappear). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.