-
Notifications
You must be signed in to change notification settings - Fork 243
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
Exit a test early if a session has exited while waiting for an output to contain a substring #6711
Exit a test early if a session has exited while waiting for an output to contain a substring #6711
Conversation
@valaparthvi: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
✅ Deploy Preview for odo-docusaurus-preview canceled.
|
f9364cb
to
f59c456
Compare
Signed-off-by: Parthvi Vala <pvala@redhat.com>
f59c456
to
60d44ea
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
/override windows-integration-test/Windows-test [odo] Error occurred on Push - unable to generate component from watch parameters: failed to populateAndParseDevfile: failed to read devfile from path 'C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\3257872455\devfile.yaml': open C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\3257872455\devfile.yaml: The system cannot find the file specified.
[odo]
Deleting dir: C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\3257872455
Unable to delete C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\3257872455 on attempt #11, trying again...
[FAILED] in [AfterEach] - C:/Users/Administrator.ANSIBLE-TEST-VS/3605/tests/helper/helper_filesystem.go:48 @ 04/04/23 04:16:35.035
<< Timeline
[FAILED] Expected
<*url.Error | 0xc000702c60>: {
Op: "Post",
URL: "http://127.0.0.1:64484/api/newuser",
Err: <*errors.errorString | 0xc000102100>{s: "EOF"},
}
to be nil
In [It] at: C:/Users/Administrator.ANSIBLE-TEST-VS/3605/tests/e2escenarios/e2e_test.go:306 @ 04/04/23 04:14:28.661
There were additional failures detected. To view them in detail run ginkgo -vv
------------------------------
Summarizing 1 Failure:
[FAIL] E2E Test starting with non-empty Directory add Binding [It] should verify developer workflow of using binding as env in innerloop
C:/Users/Administrator.ANSIBLE-TEST-VS/3605/tests/e2escenarios/e2e_test.go:306 |
@valaparthvi: Overrode contexts on behalf of valaparthvi: windows-integration-test/Windows-test In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What type of PR is this:
/kind tests
What does this PR do / why we need it:
This PR extends the helper functions
WaitForOutputToContain
and the likes to exit early if a session has exited due to an error.The motivation behind adding this change is while developing a new feature, in my case #6704, I had run into a case where
--port-forward
was given an invalid value, andodo dev
exited, but the test session runningStartDevMode
and in turn runningWaitForOutputToContain
still kept running and waiting for the output to contain a given substring. It would save a lot of time while developing a new test if the test exited early.Which issue(s) this PR fixes:
Fixes #
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer:
Add the following test to a test file(perhaps
cmd_dev_test.go
):