Skip to content

Commit

Permalink
HSEARCH-3460 Test APIs for explicit index refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
yrodiere committed Feb 17, 2020
1 parent 65d49ae commit 01b5593
Showing 1 changed file with 32 additions and 0 deletions.
@@ -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();
}
}

0 comments on commit 01b5593

Please sign in to comment.