You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2009/11/26 17:47:53 UTC

svn commit: r884635 - in /qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid: server/security/firewall/FirewallConfigTest.java test/utils/QpidTestCase.java

Author: robbie
Date: Thu Nov 26 16:47:53 2009
New Revision: 884635

URL: http://svn.apache.org/viewvc?rev=884635&view=rev
Log:
QPID-2184: correct use of reload instead of restart in testDenyOnRestartInVhost(), add a delay to the SIGHUP based reload to help ensure the new config is in place before testing continues, helping prevent sporadic failure

Modified:
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/security/firewall/FirewallConfigTest.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/security/firewall/FirewallConfigTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/security/firewall/FirewallConfigTest.java?rev=884635&r1=884634&r2=884635&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/security/firewall/FirewallConfigTest.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/security/firewall/FirewallConfigTest.java Thu Nov 26 16:47:53 2009
@@ -158,7 +158,7 @@
             {
                 try
                 {
-                    reloadBroker();
+                    restartBroker();
                 } catch (Exception e)
                 {
                     fail(e.getMessage());

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java?rev=884635&r1=884634&r2=884635&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java Thu Nov 26 16:47:53 2009
@@ -1263,6 +1263,17 @@
             BufferedReader reader = new BufferedReader (new InputStreamReader(p.getInputStream()));
             String cmd = "/bin/kill -SIGHUP " + reader.readLine();
             p = Runtime.getRuntime().exec(cmd);
+            
+            //delay to ensure the reload time has time to occur
+            try
+            {
+                Thread.sleep(1000);
+            }
+            catch (InterruptedException e)
+            {
+                //ignore
+            }
+            
         }
     }
 }



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


RE: svn commit: r884635 - in /qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid: server/security/firewall/FirewallConfigTest.java test/utils/QpidTestCase.java

Posted by Robbie Gemmell <ro...@gmail.com>.
Ah, see I hadnt actually considered that it was the write that hadnt
finished, I just jumped to the conclusion it was the subprocess that hadnt
hehe...which in retrospect even if it was, I should have checked and waited
for instead of just the random pause - ill revisit that change.

Robbie

-----Original Message-----
From: Aidan Skinner [mailto:aidan.skinner@gmail.com] 
Sent: 26 November 2009 17:36
To: dev@qpid.apache.org
Cc: commits@qpid.apache.org
Subject: Re: svn commit: r884635 - in
/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid:
server/security/firewall/FirewallConfigTest.java
test/utils/QpidTestCase.java

On Thu, Nov 26, 2009 at 4:47 PM,  <ro...@apache.org> wrote:

> QPID-2184: correct use of reload instead of restart in
testDenyOnRestartInVhost(), add a delay to the SIGHUP based reload to help
ensure the new config is in place before testing continues, helping prevent
sporadic failure

Urgh, random 1 second delay is pretty horrid.  If you're seeing
failures because the write hasn't completed flush() is probably the
right answer.

- Aidan
-- 
Apache Qpid - AMQP, JMS, other messaging love http://qpid.apache.org
"A witty saying proves nothing" - Voltaire

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: svn commit: r884635 - in /qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid: server/security/firewall/FirewallConfigTest.java test/utils/QpidTestCase.java

Posted by Aidan Skinner <ai...@gmail.com>.
On Thu, Nov 26, 2009 at 4:47 PM,  <ro...@apache.org> wrote:

> QPID-2184: correct use of reload instead of restart in testDenyOnRestartInVhost(), add a delay to the SIGHUP based reload to help ensure the new config is in place before testing continues, helping prevent sporadic failure

Urgh, random 1 second delay is pretty horrid.  If you're seeing
failures because the write hasn't completed flush() is probably the
right answer.

- Aidan
-- 
Apache Qpid - AMQP, JMS, other messaging love http://qpid.apache.org
"A witty saying proves nothing" - Voltaire

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org