Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 72671 invoked from network); 18 Jan 2010 12:20:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Jan 2010 12:20:15 -0000 Received: (qmail 11712 invoked by uid 500); 18 Jan 2010 12:20:15 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 11653 invoked by uid 500); 18 Jan 2010 12:20:15 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 11644 invoked by uid 99); 18 Jan 2010 12:20:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jan 2010 12:20:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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; Mon, 18 Jan 2010 12:20:14 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 92E9923888CF; Mon, 18 Jan 2010 12:19:54 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r900363 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java Date: Mon, 18 Jan 2010 12:19:54 -0000 To: commits@activemq.apache.org From: dejanb@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100118121954.92E9923888CF@eris.apache.org> Author: dejanb Date: Mon Jan 18 12:19:54 2010 New Revision: 900363 URL: http://svn.apache.org/viewvc?rev=900363&view=rev Log: prevent test failing on slower machines Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java?rev=900363&r1=900362&r2=900363&view=diff ============================================================================== --- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java (original) +++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java Mon Jan 18 12:19:54 2010 @@ -91,6 +91,7 @@ configure(brokerA); brokerA.addConnector("tcp://localhost:0"); brokerA.start(); + brokerA.waitUntilStarted(); proxy = new SocketProxy(brokerA.getTransportConnectors().get(0).getConnectUri()); managementContext = context.mock(ManagementContext.class); @@ -146,7 +147,9 @@ @After public void tearDown() throws Exception { brokerA.stop(); + brokerA.waitUntilStopped(); brokerB.stop(); + brokerB.waitUntilStopped(); proxy.close(); } @@ -165,6 +168,7 @@ brokerB.addNetworkConnector(discoveryAddress + "&wireFormat.maxInactivityDuration=1000&wireFormat.maxInactivityDurationInitalDelay=1000"); brokerB.start(); + brokerB.waitUntilStarted(); doReconnect(); } @@ -174,7 +178,8 @@ public void testSimpleReconnect() throws Exception { brokerB.addNetworkConnector("simple://(" + proxy.getUrl() + ")?useExponentialBackOff=false&initialReconnectDelay=500&wireFormat.maxInactivityDuration=1000&wireFormat.maxInactivityDurationInitalDelay=1000"); - brokerB.start(); + brokerB.start(); + brokerB.waitUntilStarted(); doReconnect(); } @@ -189,7 +194,7 @@ })); // wait for network connector - assertTrue("network connector mbean registered within 1 minute", mbeanRegistered.tryAcquire(60, TimeUnit.SECONDS)); + assertTrue("network connector mbean registered within 2 minute", mbeanRegistered.tryAcquire(120, TimeUnit.SECONDS)); // force an inactivity timeout via the proxy proxy.pause();