Skip to content

Commit 6c4b9ac

Browse files
committed
WIP
1 parent 7c39678 commit 6c4b9ac

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/test/java/org/springframework/data/elasticsearch/repositories/custommethod/CustomMethodRepositoryBaseTests.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1431,13 +1431,15 @@ public void streamMethodsShouldWorkWithLargeResultSets() {
14311431
// given
14321432
List<SampleEntity> entities = createSampleEntities("abc", 10001);
14331433
repository.saveAll(entities);
1434+
operations.indexOps(SampleEntity.class).refresh();
14341435

14351436
// when
14361437
Stream<SampleEntity> stream = streamingRepository.findByType("abc");
14371438

14381439
// then
14391440
assertThat(stream).isNotNull();
1440-
assertThat(stream.count()).isEqualTo(10001L);
1441+
long count = stream.count();
1442+
assertThat(count).isEqualTo(10001L);
14411443
}
14421444

14431445
@Test // DATAES-605
@@ -1734,6 +1736,7 @@ public void setVersion(@Nullable java.lang.Long version) {
17341736
* @author Mohsin Husen
17351737
* @author Kevin Leturc
17361738
*/
1739+
@SuppressWarnings("SpringDataRepositoryMethodParametersInspection")
17371740
public interface SampleCustomMethodRepository extends ElasticsearchRepository<SampleEntity, String> {
17381741

17391742
Page<SampleEntity> findByType(String type, Pageable pageable);

src/test/java/org/springframework/data/elasticsearch/repositories/custommethod/CustomMethodRepositoryTests.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
package org.springframework.data.elasticsearch.repositories.custommethod;
1717

18+
import org.junit.jupiter.api.Disabled;
1819
import org.springframework.context.annotation.Bean;
1920
import org.springframework.context.annotation.Configuration;
2021
import org.springframework.context.annotation.Import;
@@ -42,4 +43,9 @@ IndexNameProvider indexNameProvider() {
4243
return new IndexNameProvider("custom-method-repository");
4344
}
4445
}
46+
47+
@Disabled("this test crashes the transport client connection in some dockerized test container setup")
48+
@Override
49+
public void streamMethodsShouldWorkWithLargeResultSets() {
50+
}
4551
}

0 commit comments

Comments
 (0)