Return-Path: X-Original-To: apmail-sling-commits-archive@www.apache.org Delivered-To: apmail-sling-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 3E28010F9D for ; Wed, 22 Jan 2014 10:49:57 +0000 (UTC) Received: (qmail 45242 invoked by uid 500); 22 Jan 2014 10:49:56 -0000 Delivered-To: apmail-sling-commits-archive@sling.apache.org Received: (qmail 45174 invoked by uid 500); 22 Jan 2014 10:49:55 -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 45167 invoked by uid 99); 22 Jan 2014 10:49:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jan 2014 10:49:54 +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; Wed, 22 Jan 2014 10:49:51 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 990C523888D7; Wed, 22 Jan 2014 10:49:30 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1560310 - /sling/trunk/contrib/extensions/replication/src/test/java/org/apache/sling/replication/serialization/impl/DefaultReplicationPackageImporterTest.java Date: Wed, 22 Jan 2014 10:49:30 -0000 To: commits@sling.apache.org From: tommaso@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140122104930.990C523888D7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tommaso Date: Wed Jan 22 10:49:30 2014 New Revision: 1560310 URL: http://svn.apache.org/r1560310 Log: SLING-3330 - added asynchronous package import, fixed test Modified: sling/trunk/contrib/extensions/replication/src/test/java/org/apache/sling/replication/serialization/impl/DefaultReplicationPackageImporterTest.java Modified: sling/trunk/contrib/extensions/replication/src/test/java/org/apache/sling/replication/serialization/impl/DefaultReplicationPackageImporterTest.java URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/replication/src/test/java/org/apache/sling/replication/serialization/impl/DefaultReplicationPackageImporterTest.java?rev=1560310&r1=1560309&r2=1560310&view=diff ============================================================================== --- sling/trunk/contrib/extensions/replication/src/test/java/org/apache/sling/replication/serialization/impl/DefaultReplicationPackageImporterTest.java (original) +++ sling/trunk/contrib/extensions/replication/src/test/java/org/apache/sling/replication/serialization/impl/DefaultReplicationPackageImporterTest.java Wed Jan 22 10:49:30 2014 @@ -21,8 +21,6 @@ package org.apache.sling.replication.ser import java.io.ByteArrayInputStream; import java.io.InputStream; import java.lang.reflect.Field; -import java.util.Collection; -import java.util.LinkedList; import java.util.Map; import org.apache.sling.event.jobs.Job; import org.apache.sling.event.jobs.JobBuilder; @@ -113,13 +111,10 @@ public class DefaultReplicationPackageIm ReplicationPackageBuilder packageBuilder = mock(ReplicationPackageBuilder.class); ReplicationPackage replicationPackage = new VoidReplicationPackage(new ReplicationRequest(System.currentTimeMillis(), ReplicationActionType.DELETE, "/content"), "void"); when(packageBuilder.readPackage(any(InputStream.class), eq(true))).thenReturn(replicationPackage); - Collection packageBuilders = new LinkedList(); - packageBuilders.add(packageBuilder); - when(replicationPackageBuilderProvider.getAvailableReplicationPackageBuilders()).thenReturn(packageBuilders); replicationPackageBuilderProviderField.set(importer, replicationPackageBuilderProvider); InputStream stream = mock(InputStream.class); - assertTrue(importer.importStream(stream, null)); + assertFalse(importer.importStream(stream, null)); } @Test