From 90183cc5bd66e149bb43b0deb6fdc590e779e96f Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Thu, 22 Oct 2020 13:17:57 -0400 Subject: [PATCH] Remove `channelMessages` collection before tests The `MongoDbAvailableTests.cleanupCollections()` remove some collections before tests, but not `channelMessages` * Fix the `ConfigurableMongoDbMessageGroupStoreTests` to remove `channelMessages` collection, too --- .../store/ConfigurableMongoDbMessageGroupStoreTests.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-integration-mongodb/src/test/java/org/springframework/integration/mongodb/store/ConfigurableMongoDbMessageGroupStoreTests.java b/spring-integration-mongodb/src/test/java/org/springframework/integration/mongodb/store/ConfigurableMongoDbMessageGroupStoreTests.java index e0ae7246a8..49674bf10d 100644 --- a/spring-integration-mongodb/src/test/java/org/springframework/integration/mongodb/store/ConfigurableMongoDbMessageGroupStoreTests.java +++ b/spring-integration-mongodb/src/test/java/org/springframework/integration/mongodb/store/ConfigurableMongoDbMessageGroupStoreTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -117,7 +117,7 @@ public class ConfigurableMongoDbMessageGroupStoreTests extends AbstractMongoDbMe @Test @MongoDbAvailable public void testWithCustomConverter() throws Exception { - this.cleanupCollections(new SimpleMongoDbFactory(new MongoClient(), "test")); + this.cleanupCollections(new SimpleMongoDbFactory(new MongoClient(), "test"), "channelMessages"); ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("ConfigurableMongoDbMessageStore-CustomConverter.xml", this.getClass()); context.refresh(); @@ -131,7 +131,7 @@ public class ConfigurableMongoDbMessageGroupStoreTests extends AbstractMongoDbMe @Test @MongoDbAvailable public void testPriorityChannel() throws Exception { - this.cleanupCollections(new SimpleMongoDbFactory(new MongoClient(), "test")); + this.cleanupCollections(new SimpleMongoDbFactory(new MongoClient(), "test"), "channelMessages"); ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("ConfigurableMongoDbMessageStore-CustomConverter.xml", this.getClass()); context.refresh();