Return-Path: Delivered-To: apmail-sling-commits-archive@www.apache.org Received: (qmail 19029 invoked from network); 3 Sep 2009 14:53:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Sep 2009 14:53:06 -0000 Received: (qmail 32906 invoked by uid 500); 3 Sep 2009 14:53:06 -0000 Delivered-To: apmail-sling-commits-archive@sling.apache.org Received: (qmail 32849 invoked by uid 500); 3 Sep 2009 14:53:06 -0000 Mailing-List: contact commits-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list commits@sling.apache.org Received: (qmail 32840 invoked by uid 99); 3 Sep 2009 14:53:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Sep 2009 14:53:06 +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; Thu, 03 Sep 2009 14:53:04 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5814D238890B; Thu, 3 Sep 2009 14:52:44 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r810983 - /sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/osgi/installer/it/ConfigInstallTest.java Date: Thu, 03 Sep 2009 14:52:44 -0000 To: commits@sling.apache.org From: bdelacretaz@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090903145244.5814D238890B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: bdelacretaz Date: Thu Sep 3 14:52:43 2009 New Revision: 810983 URL: http://svn.apache.org/viewvc?rev=810983&view=rev Log: SLING-1078 - more robust testing Modified: sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/osgi/installer/it/ConfigInstallTest.java Modified: sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/osgi/installer/it/ConfigInstallTest.java URL: http://svn.apache.org/viewvc/sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/osgi/installer/it/ConfigInstallTest.java?rev=810983&r1=810982&r2=810983&view=diff ============================================================================== --- sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/osgi/installer/it/ConfigInstallTest.java (original) +++ sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/osgi/installer/it/ConfigInstallTest.java Thu Sep 3 14:52:43 2009 @@ -167,7 +167,8 @@ final Configuration c = ca.getConfiguration(cfgPid); c.update(cfgData); waitForConfigValue("After manual installation", cfgPid, TIMEOUT, "foo", "bar"); - assertEquals("Expected one ConfigurationEvent after manual install", 1, events.size()); + Condition cond = new Condition() { public boolean isTrue() { return events.size() == 1; }}; + waitForCondition("Expected two ConfigurationEvents since beginning of test", TIMEOUT, cond); long nOps = installer.getCounters()[OsgiInstaller.OSGI_TASKS_COUNTER]; installer.addResource(getInstallableResource(cfgPid, cfgData)); @@ -180,7 +181,7 @@ cfgData.put("foo", "changed"); installer.addResource(getInstallableResource(cfgPid, cfgData)); waitForConfigValue("After changing value", cfgPid, TIMEOUT, "foo", "changed"); - final Condition cond = new Condition() { public boolean isTrue() { return events.size() == 2; }}; + cond = new Condition() { public boolean isTrue() { return events.size() == 2; }}; waitForCondition("Expected two ConfigurationEvents since beginning of test", TIMEOUT, cond); } }