Skip to content

Commit 3d36c3f

Browse files
chore: change google-cloud-vision ITSystemTest to fuzzy Palace of Fine Arts assertions (#9255)
* chore: change google-cloud-vision ITSystemTest to fuzzy Palace of Fine Arts assertions * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 3d9341a commit 3d36c3f

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

java-vision/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Java idiomatic client for [Cloud Vision][product-docs].
1414

1515
If you are using Maven, add this to your pom.xml file:
1616

17-
<!-- {x-version-update-start:google-cloud-vision:released} -->
1817

1918
```xml
2019
<dependency>
@@ -35,7 +34,6 @@ If you are using SBT, add this to your dependencies:
3534
```Scala
3635
libraryDependencies += "com.google.cloud" % "google-cloud-vision" % "3.11.0"
3736
```
38-
<!-- {x-version-update-end} -->
3937

4038
## Authentication
4139

@@ -52,7 +50,7 @@ The client application making API calls must be granted [authorization scopes][a
5250
You will need a [Google Cloud Platform Console][developer-console] project with the Cloud Vision [API enabled][enable-api].
5351
You will need to [enable billing][enable-billing] to use Google Cloud Vision.
5452
[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by
55-
[installing the Google Cloud SDK][cloud-sdk] and running the following commands in command line:
53+
[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line:
5654
`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`.
5755

5856
### Installation and setup
@@ -173,14 +171,14 @@ Java is a registered trademark of Oracle and/or its affiliates.
173171
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
174172
[stability-image]: https://img.shields.io/badge/stability-stable-green
175173
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-vision.svg
176-
[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-vision&core=gav
174+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-vision/3.11.0
177175
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
178176
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
179177
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
180178
[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy
181179
[developer-console]: https://console.developers.google.com/
182180
[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects
183-
[cloud-sdk]: https://cloud.google.com/sdk/
181+
[cloud-cli]: https://cloud.google.com/cli
184182
[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting
185183
[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md
186184
[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct

java-vision/google-cloud-vision/src/test/java/com/google/cloud/vision/it/ITSystemTest.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,8 @@ public void detectLandmarksTest() throws IOException {
338338
for (EntityAnnotation annotation : assertNotEmpty(res, res.getLandmarkAnnotationsList())) {
339339
actual.add(annotation.getDescription());
340340
}
341-
assertThat(actual).contains("Palace of Fine Arts");
341+
String allAnnotations = String.join(";", actual);
342+
assertThat(allAnnotations).ignoringCase().contains("Palace of Fine Arts");
342343
}
343344

344345
@Test
@@ -355,7 +356,8 @@ public void detectLandmarksUrlTest() throws Exception {
355356
for (EntityAnnotation annotation : assertNotEmpty(res, res.getLandmarkAnnotationsList())) {
356357
actual.add(annotation.getDescription());
357358
}
358-
assertThat(actual).contains("Palace of Fine Arts");
359+
String allAnnotations = String.join(";", actual);
360+
assertThat(allAnnotations).ignoringCase().contains("Palace of Fine Arts");
359361
}
360362

361363
@Test
@@ -366,7 +368,8 @@ public void detectLandmarksGcsTest() throws IOException {
366368
for (EntityAnnotation annotation : assertNotEmpty(res, res.getLandmarkAnnotationsList())) {
367369
actual.add(annotation.getDescription());
368370
}
369-
assertThat(actual).contains("Palace of Fine Arts");
371+
String allAnnotations = String.join(";", actual);
372+
assertThat(allAnnotations).ignoringCase().contains("Palace of Fine Arts");
370373
}
371374

372375
@Test
@@ -476,7 +479,8 @@ public void detectWebEntitiesGcsTest() {
476479
assertNotEmpty(res, res.getWebDetection().getWebEntitiesList())) {
477480
actual.add(entity.getDescription());
478481
}
479-
assertThat(actual).contains("Palace of Fine Arts");
482+
String allAnnotations = String.join(";", actual);
483+
assertThat(allAnnotations).ignoringCase().contains("Palace of Fine Arts");
480484
}
481485

482486
@Test
@@ -531,7 +535,8 @@ public void detectWebEntitiesIncludeGeoResultsGcsTest() {
531535
assertNotEmpty(res, res.getWebDetection().getWebEntitiesList())) {
532536
actual.add(entity.getDescription());
533537
}
534-
assertThat(actual).contains("Palace of Fine Arts");
538+
String allAnnotations = String.join(";", actual);
539+
assertThat(allAnnotations).ignoringCase().contains("Palace of Fine Arts");
535540
}
536541

537542
@Test

0 commit comments

Comments
 (0)