Exit a test early if a session has exited while waiting for an output to contain a substring#6711
Conversation
|
@valaparthvi: The label(s) DetailsIn 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 <[email protected]>
f59c456 to
60d44ea
Compare
|
Kudos, SonarCloud Quality Gate passed!
|
|
/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 DetailsIn 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
WaitForOutputToContainand 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-forwardwas given an invalid value, andodo devexited, but the test session runningStartDevModeand in turn runningWaitForOutputToContainstill 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):