Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HSEARCH-3836 Test passing routing keys to PojoScopeWorkspace.purge() …
…and SearchWorkspace.purge()
- Loading branch information
Showing
4 changed files
with
58 additions
and
3 deletions.
There are no files selected for viewing
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
37 changes: 37 additions & 0 deletions
37
...bernate/search/integrationtest/mapper/orm/workspace/SearchWorkspacePurgeRoutingKeyIT.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,37 @@ | ||
/* | ||
* 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.Set; | ||
import java.util.concurrent.CompletableFuture; | ||
|
||
import org.hibernate.search.mapper.orm.work.SearchWorkspace; | ||
import org.hibernate.search.util.common.impl.CollectionHelper; | ||
import org.hibernate.search.util.impl.integrationtest.common.rule.BackendMock; | ||
import org.hibernate.search.util.impl.test.annotation.TestForIssue; | ||
|
||
@TestForIssue(jiraKey = "HSEARCH-3049") | ||
public class SearchWorkspacePurgeRoutingKeyIT extends AbstractSearchWorkspaceSimpleOperationIT { | ||
|
||
private final Set<String> ROUTING_KEYS = CollectionHelper.asLinkedHashSet( "key1", "key2" ); | ||
|
||
@Override | ||
protected void expectWork(BackendMock backendMock, String indexName, CompletableFuture<?> future) { | ||
backendMock.expectIndexScaleWorks( indexName ) | ||
.purge( ROUTING_KEYS, future ); | ||
} | ||
|
||
@Override | ||
protected void executeSync(SearchWorkspace workspace) { | ||
workspace.purge( ROUTING_KEYS ); | ||
} | ||
|
||
@Override | ||
protected CompletableFuture<?> executeAsync(SearchWorkspace workspace) { | ||
return workspace.purgeAsync( ROUTING_KEYS ); | ||
} | ||
} |
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
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