Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue#8261 : Added test cases for InfiniteStreamRecognize class #9498

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

abhasal
Copy link

@abhasal abhasal commented Aug 26, 2024

Description

Fixes #8261

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

  • I have followed Sample Format Guide
  • pom.xml parent set to latest shared-configuration
  • Appropriate changes to README are included in PR
  • These samples need a new API enabled in testing projects to pass (let us know which ones)
  • These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
  • Tests pass: mvn clean verify required
  • Lint passes: mvn -P lint checkstyle:check required
  • Static Analysis: mvn -P lint clean compile pmd:cpd-check spotbugs:check advisory only
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
  • [x ] Please merge this PR for me once it is approved

@abhasal abhasal requested review from yoshi-approver and a team as code owners August 26, 2024 16:01
Copy link

google-cla bot commented Aug 26, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@product-auto-label product-auto-label bot added samples Issues that are directly related to samples. api: speech Issues related to the Speech-to-Text API. labels Aug 26, 2024
@Sita04 Sita04 assigned minherz and unassigned bourgeoisor Aug 27, 2024
@minherz minherz added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 3, 2024
@kokoro-team kokoro-team removed kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Sep 3, 2024
Copy link
Contributor

@minherz minherz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is an expected running time for this test?
based on lack of test input it looks like the code sample will wait for input and get terminated after 5 minutes.

Comment on lines +45 to +51
System.setErr(new PrintStream(stderr));
}

@After
public void tearDown() {
System.setOut(originalStdout);
System.setErr(originalStderr);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: what is a reason to intercept Stderr if the test validates only Stdout?

@minherz minherz marked this pull request as draft September 3, 2024 18:44
@minherz
Copy link
Contributor

minherz commented Sep 3, 2024

I converted PR to draft because it does not pass automatic testing. Please, ensure that all tests pass before submitting it to the review.
It seems that the execution time of the test is bound by 5 min waiting for microphone input that is hard-coded in the code sample. If my interpretation is correct, the code sample and test should be modified to bring the running time of the test under 1 min.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: speech Issues related to the Speech-to-Text API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test needed for speech/src/main/java/com/example/speech/InfiniteStreamRecognize.java
4 participants