Skip to content

Commit 73f5e1b

Browse files
authored
Fixed for search test in other cloud 20210902 (Azure#23884)
1 parent 6596f03 commit 73f5e1b

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/SearchSyncTests.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,8 @@ public void canFilter() {
406406
client = getSearchClientBuilder(INDEX_NAME).buildClient();
407407

408408
SearchOptions searchOptions = new SearchOptions()
409-
.setFilter("Rating gt 3 and LastRenovationDate gt 2000-01-01T00:00:00Z");
409+
.setFilter("Rating gt 3 and LastRenovationDate gt 2000-01-01T00:00:00Z")
410+
.setOrderBy("HotelId asc");
410411
SearchPagedIterable results = client.search("*", searchOptions, Context.NONE);
411412
assertNotNull(results);
412413

@@ -628,7 +629,8 @@ public void searchWithScoringProfileBoostsScore() {
628629
SearchOptions searchOptions = new SearchOptions()
629630
.setScoringProfile("nearest")
630631
.setScoringParameters(new ScoringParameter("myloc", new GeoPoint(-122.0, 49.0)))
631-
.setFilter("Rating eq 5 or Rating eq 1");
632+
.setFilter("Rating eq 5 or Rating eq 1")
633+
.setOrderBy("HotelId desc");
632634

633635
List<Map<String, Object>> response = getSearchResults(client.search("hotel", searchOptions, Context.NONE));
634636
assertEquals(2, response.size());

sdk/search/test-resources.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
},
3333
"searchSku": {
3434
"type": "string",
35-
"defaultValue": "free",
35+
"defaultValue": "basic",
3636
"allowedValues": [
3737
"free",
3838
"basic",
@@ -62,7 +62,7 @@
6262
"properties": {
6363
"replicaCount": 1,
6464
"partitionCount": 1,
65-
"hostingMode": "default",
65+
"hostingMode": "Default",
6666
"publicNetworkAccess": "Enabled",
6767
"networkRuleSet": {
6868
"ipRules": []
@@ -85,8 +85,8 @@
8585
"kind": "StorageV2",
8686
"resources": [
8787
{
88-
"type": "blobServices/containers",
89-
"name": "[concat('default/', variables('storageContainerName'))]",
88+
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
89+
"name": "[concat(variables('storageAccountName'), '/default/', variables('storageContainerName'))]",
9090
"apiVersion": "[variables('storageApiVersion')]",
9191
"properties": {},
9292
"dependsOn": [

sdk/search/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ stages:
44
- template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml
55
parameters:
66
ServiceDirectory: search
7+
SupportedClouds: 'Public,UsGov,China'
78
TimeoutInMinutes: 60
89
MaxParallel: 7
910
Artifacts:

0 commit comments

Comments
 (0)