Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HSEARCH-3460 Test APIs for explicit index refresh
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
...a/org/hibernate/search/integrationtest/mapper/orm/workspace/SearchWorkspaceRefreshIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Hibernate Search, full-text search for your domain model | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later | ||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. | ||
*/ | ||
package org.hibernate.search.integrationtest.mapper.orm.workspace; | ||
|
||
import java.util.concurrent.CompletableFuture; | ||
|
||
import org.hibernate.search.mapper.orm.work.SearchWorkspace; | ||
import org.hibernate.search.util.impl.integrationtest.common.rule.BackendMock; | ||
import org.hibernate.search.util.impl.test.annotation.TestForIssue; | ||
|
||
@TestForIssue(jiraKey = "HSEARCH-3460") | ||
public class SearchWorkspaceRefreshIT extends AbstractSearchWorkspaceSimpleOperationIT { | ||
@Override | ||
protected void expectWork(BackendMock backendMock, String indexName, CompletableFuture<?> future) { | ||
backendMock.expectIndexScopeWorks( indexName ) | ||
.refresh( future ); | ||
} | ||
|
||
@Override | ||
protected void executeSync(SearchWorkspace workspace) { | ||
workspace.refresh(); | ||
} | ||
|
||
@Override | ||
protected CompletableFuture<?> executeAsync(SearchWorkspace workspace) { | ||
return workspace.refreshAsync(); | ||
} | ||
} |