Details
-
Bug
-
Resolution: Incomplete
-
Critical
-
None
-
7.0.3
-
None
-
Docker
Couchbase 7.0.3
-
Untriaged
-
1
-
Unknown
Description
Context:
I'm maintaining an Open Source project: JHipster it helps customers to start fast by generating a complete application (Java backend, Angular/Vue/React frontend), with their entities, and a complete set of unit and integration tests. It's compatible with multiple databases, including Couchbase, the part that I'm maintaining.
JHipster uses Testcontainers in order to run integration tests.
Issue:
All the integration tests, including Search tests was passing correctly with version 7.0.0. But, beginning from 7.0.1, Search tests are failing. See https://github.com/jhipster/generator-jhipster/pull/17500#issuecomment-1006403276
JHipster uses N1QL Search Function using Spring Data Couchbase:
@Query("#{#n1ql.selectEntity} WHERE #{#n1ql.filter} AND SEARCH(#{#n1ql.bucket}, #{[0]}) #{[1]}") |
List<Place> search(String queryString, Pageable pageable);
|
The integration tests are using a helper function to wait until the document was indexed:
@Test
|
void searchPlace() throws Exception { |
...
|
// Wait for the place to be indexed |
TestUtil.retryUntilNotEmpty(() -> placeRepository.search("id:" + place.getId())); |
...
|
}
|
|
public static <T> void retryUntilNotEmpty(Callable<Iterable<T>> iterableCallable) { |
Mono
|
.defer(() ->
|
Mono
|
.fromCallable(iterableCallable)
|
.flatMapIterable(Function.identity())
|
.next()
|
.switchIfEmpty(Mono.error(new NoSuchElementException())) |
)
|
.retry()
|
.timeout(Duration.ofSeconds(5)) |
.block();
|
}
|
I tried to increase the timeout up to 10 min, still nothing. So there maybe so regression beginning from version 7.0.1.