aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-04-01 01:51:30 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-04-01 01:51:30 +0000
commit7835e1f8aec02b87fad60897bf0b36f13a5cfc24 (patch)
treeb1f200a4cf759b986e8c733b02f241fc9ecd44e4
parentdcb58cfa7e46efe22058c5095f3df7c5a766ed2d (diff)
parent12944ec9b763c59ca8799e2b9fcbfcfdad49bc80 (diff)
downloadicing-android13-mainline-art-release.tar.gz
Snap for 9867090 from 12944ec9b763c59ca8799e2b9fcbfcfdad49bc80 to mainline-art-releaseaml_art_331813100aml_art_331813010android13-mainline-art-release
Change-Id: Iafe45d2cd9eec3c21daa8929c58d1192652f4264
-rw-r--r--java/tests/instrumentation/src/androidx/appsearch/smoketest/AndroidXSmokeTest.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/java/tests/instrumentation/src/androidx/appsearch/smoketest/AndroidXSmokeTest.java b/java/tests/instrumentation/src/androidx/appsearch/smoketest/AndroidXSmokeTest.java
index 98b1b25..21f66c2 100644
--- a/java/tests/instrumentation/src/androidx/appsearch/smoketest/AndroidXSmokeTest.java
+++ b/java/tests/instrumentation/src/androidx/appsearch/smoketest/AndroidXSmokeTest.java
@@ -48,14 +48,15 @@ public class AndroidXSmokeTest {
@Before
public void setUp() throws Exception {
appSearch =
- LocalStorage.createSearchSession(
+ LocalStorage.createSearchSessionAsync(
new SearchContext.Builder(
ApplicationProvider.getApplicationContext(),
"database")
.build())
.get();
// Remove all data before test
- appSearch.setSchema(new SetSchemaRequest.Builder().setForceOverride(true).build()).get();
+ appSearch.setSchemaAsync(new SetSchemaRequest.Builder().setForceOverride(true).build())
+ .get();
}
@Test
@@ -70,13 +71,13 @@ public class AndroidXSmokeTest {
.setTokenizerType(StringPropertyConfig.TOKENIZER_TYPE_PLAIN)
.build())
.build();
- appSearch.setSchema(new SetSchemaRequest.Builder().addSchemas(schema).build()).get();
+ appSearch.setSchemaAsync(new SetSchemaRequest.Builder().addSchemas(schema).build()).get();
}
@Test
public void smokeTestAnnotationProcessor() throws Exception {
appSearch
- .setSchema(
+ .setSchemaAsync(
new SetSchemaRequest.Builder()
.addDocumentClasses(TestDocument.class)
.build())
@@ -84,7 +85,7 @@ public class AndroidXSmokeTest {
TestDocument input = new TestDocument("namespace", "id1", "avocado");
appSearch
- .put(new PutDocumentsRequest.Builder().addDocuments(input).build())
+ .putAsync(new PutDocumentsRequest.Builder().addDocuments(input).build())
.get()
.checkSuccess();
SearchResults results =
@@ -93,10 +94,10 @@ public class AndroidXSmokeTest {
new SearchSpec.Builder()
.setTermMatch(SearchSpec.TERM_MATCH_PREFIX)
.build());
- List<SearchResult> page = results.getNextPage().get();
+ List<SearchResult> page = results.getNextPageAsync().get();
assertThat(page).hasSize(1);
SearchResult result = page.get(0);
- assertThat(results.getNextPage().get()).isEmpty();
+ assertThat(results.getNextPageAsync().get()).isEmpty();
GenericDocument genericOutput = result.getGenericDocument();
assertEquals("id1", genericOutput.getId());