Skip to content

retail: some tests failing, blocking PRs (java) #10133

@glasnt

Description

@glasnt

In which file did you encounter the issue?

  • retail/interactive-tutorials/src/test/java/search/SearchWithBoostSpecTest.java
  • retail/interactive-tutorials/src/test/java/search/SearchWithFacetSpecTest.java
  • retail/interactive-tutorials/src/test/java/search/SearchWithFilteringTest.java

Did you change the file? If so, how?

Comments only

Describe the issue

https://btx.cloud.google.com/invocations/e2f00054-73d9-41e9-a59a-10f4ab36efb8/log

cd retail/interactive-tutorials
mvn --quiet --batch-mode --fail-at-end clean verify \
    -Dfile.encoding="UTF-8" \
    -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
    -Dmaven.test.redirectTestOutputToFile=true \
    -Dbigtable.projectID="java-docs-samples-testing" \
    -Dbigtable.instanceID=instance
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.24 s <<< FAILURE! - in search.SearchWithFacetSpecTest
[ERROR] search.SearchWithFacetSpecTest.testOutput  Time elapsed: 0.238 s  <<< FAILURE!
expected to contain:
    Search response
but was:
    Search request: placement: "projects/java-docs-samples-testing/locations/global/catalogs/default_catalog/placements/default_search"
    query: "Tee"
    visitor_id: "80a7ee32-54e7-448d-b540-aba76b2feef3"
    page_size: 10
    facet_specs {
      facet_key {
        key: "colorFamilies"
      }
    }
    
    The search operation returned no matching results.
    
	at search.SearchWithFacetSpecTest.testOutput(SearchWithFacetSpecTest.java:57)

[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.056 s <<< FAILURE! - in search.SearchWithBoostSpecTest
[ERROR] search.SearchWithBoostSpecTest.testOutput  Time elapsed: 0.054 s  <<< FAILURE!
expected to contain:
    Search response
but was:
    Search request: placement: "projects/java-docs-samples-testing/locations/global/catalogs/default_catalog/placements/default_search"
    query: "Tee"
    visitor_id: "2cf6e5fa-5954-420e-99b3-9a2fa16e8025"
    page_size: 10
    boost_spec {
      condition_boost_specs {
        condition: "(colorFamilies: ANY(\"Blue\"))"
      }
    }
    
    The search operation returned no matching results.
    
	at search.SearchWithBoostSpecTest.testOutput(SearchWithBoostSpecTest.java:57)

[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.044 s <<< FAILURE! - in search.SearchWithFilteringTest
[ERROR] search.SearchWithFilteringTest.testOutput  Time elapsed: 0.042 s  <<< FAILURE!
expected to contain:
    Search response
but was:
    Search request: placement: "projects/java-docs-samples-testing/locations/global/catalogs/default_catalog/placements/default_search"
    query: "Tee"
    visitor_id: "601d2cb1-74ec-445f-8827-4d5edd12632a"
    page_size: 10
    filter: "(colorFamilies: ANY(\"Black\"))"
    
    The search operation returned no matching results.
    
	at search.SearchWithFilteringTest.testOutput(SearchWithFilteringTest.java:58)

[ERROR] Failures: 
[ERROR]   SearchWithBoostSpecTest.testOutput:57 expected to contain:
    Search response
but was:
    Search request: placement: "projects/java-docs-samples-testing/locations/global/catalogs/default_catalog/placements/default_search"
    query: "Tee"
    visitor_id: "2cf6e5fa-5954-420e-99b3-9a2fa16e8025"
    page_size: 10
    boost_spec {
      condition_boost_specs {
        condition: "(colorFamilies: ANY(\"Blue\"))"
      }
    }
    
    The search operation returned no matching results.
    
[ERROR]   SearchWithFacetSpecTest.testOutput:57 expected to contain:
    Search response
but was:
    Search request: placement: "projects/java-docs-samples-testing/locations/global/catalogs/default_catalog/placements/default_search"
    query: "Tee"
    visitor_id: "80a7ee32-54e7-448d-b540-aba76b2feef3"
    page_size: 10
    facet_specs {
      facet_key {
        key: "colorFamilies"
      }
    }
    
    The search operation returned no matching results.
    
[ERROR]   SearchWithFilteringTest.testOutput:58 expected to contain:
    Search response
but was:
    Search request: placement: "projects/java-docs-samples-testing/locations/global/catalogs/default_catalog/placements/default_search"
    query: "Tee"
    visitor_id: "601d2cb1-74ec-445f-8827-4d5edd12632a"
    page_size: 10
    filter: "(colorFamilies: ANY(\"Black\"))"
    
    The search operation returned no matching results.
    

All tests in the product folder are run when a sample is changed. This is blocking the following PRs:

This issue serves as a reference for use when disabling these failing tests to unblock these PRs.

See similar issue in Node.JS: GoogleCloudPlatform/nodejs-docs-samples#4136

Metadata

Metadata

Assignees

Labels

api: retailIssues related to the Retail API API.priority: p2Moderately-important priority. Fix may not be included in next release.samplesIssues that are directly related to samples.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions