You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2020/07/24 04:08:18 UTC

[james-project] branch master updated: JAMES-3313 Lazily instanciate BlobStore within mailbox/cassandra tests

This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git


The following commit(s) were added to refs/heads/master by this push:
     new 37b2d0b  JAMES-3313 Lazily instanciate BlobStore within mailbox/cassandra tests
37b2d0b is described below

commit 37b2d0b4f2088064c3b16a155e32cc6317b63d8d
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Fri Jul 24 11:07:18 2020 +0700

    JAMES-3313 Lazily instanciate BlobStore within mailbox/cassandra tests
    
    Otherwize tests not using the blobStore might still need to install the Blob Store related modules
---
 .../java/org/apache/james/mailbox/cassandra/mail/utils/GuiceUtils.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/utils/GuiceUtils.java b/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/utils/GuiceUtils.java
index 204438c..39e539d 100644
--- a/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/utils/GuiceUtils.java
+++ b/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/utils/GuiceUtils.java
@@ -59,7 +59,7 @@ public class GuiceUtils {
         return Modules.combine(
             binder -> binder.bind(MessageId.Factory.class).toInstance(messageIdFactory),
             binder -> binder.bind(BlobId.Factory.class).toInstance(new HashBlobId.Factory()),
-            binder -> binder.bind(BlobStore.class).toInstance(CassandraBlobStoreFactory.forTesting(session)),
+            binder -> binder.bind(BlobStore.class).toProvider(() -> CassandraBlobStoreFactory.forTesting(session)),
             binder -> binder.bind(Session.class).toInstance(session),
             binder -> binder.bind(CassandraTypesProvider.class).toInstance(typesProvider),
             binder -> binder.bind(CassandraConfiguration.class).toInstance(configuration),


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org