From b60c9af35cbc7098bf278bf22b1cdaec0d5d2b28 Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Thu, 25 Apr 2019 13:04:21 +0200 Subject: [PATCH] DATAES-565 - Alter test setup to assure a clean start. Make sure required resources are cleaned before running tests. Some leftovers from other tests may still be lingering around and we need to get rid of those. --- .../support/SimpleReactiveElasticsearchRepositoryTests.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepositoryTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepositoryTests.java index 94435cecb..b8d131603 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepositoryTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepositoryTests.java @@ -31,7 +31,7 @@ import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.action.support.WriteRequest.RefreshPolicy; import org.elasticsearch.client.RequestOptions; import org.elasticsearch.client.RestHighLevelClient; -import org.junit.After; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.reactivestreams.Publisher; @@ -75,8 +75,8 @@ public class SimpleReactiveElasticsearchRepositoryTests { @Autowired ReactiveSampleEntityRepository repository; - @After - public void tearDown() { + @Before + public void setUp() { TestUtils.deleteIndex(INDEX); }