Digitization ft - #1282
Conversation
| // Running ALL failure tests together (all failure suites): | ||
| // | ||
| // ginkgo -r --label-filter="failure-test" ./tests/e2e | ||
| // | ||
| // Excluding ALL failure tests from the normal run: | ||
| // | ||
| // ginkgo -r --label-filter="!failure-test" ./tests/e2e | ||
| // | ||
| // Running only digitize failure tests: | ||
| // | ||
| // ginkgo -r --label-filter="digitize-failure" ./tests/e2e | ||
| // | ||
| // Running by sub-category: | ||
| // | ||
| // ginkgo -r --label-filter="failure-test && digitize-input" ./tests/e2e | ||
| // ginkgo -r --label-filter="failure-test && digitize-deduplication" ./tests/e2e | ||
| // ginkgo -r --label-filter="failure-test && digitize-active-job" ./tests/e2e | ||
| // ginkgo -r --label-filter="failure-test && digitize-active-doc" ./tests/e2e |
There was a problem hiding this comment.
we can remove these comments as we have this in readme file already
There was a problem hiding this comment.
yes. Removed them now.
|
|
||
| // digitizeFailureInProgressPollInterval is how often TC-4 and TC-5 poll for | ||
| // the job's in_progress transition. | ||
| const digitizeFailureInProgressPollInterval = 5 * time.Second //nolint:mnd |
There was a problem hiding this comment.
is this interval sufficient?
There was a problem hiding this comment.
increased the time to 15 seconds
| // (zero wait) when --app-name was not provided rather than polling | ||
| // for 2 minutes against a non-existent application. | ||
| resolveDigitizeURL := func() { | ||
| // providedAppName is the raw value of --app-name. appName is always |
There was a problem hiding this comment.
these comments are not needed as the logic is self explanatory IMO
There was a problem hiding this comment.
yes, removed them.
| gomega.Expect(firstJobErr).NotTo(gomega.HaveOccurred(), | ||
| "First ingestion job should be accepted (unexpected error)") | ||
| } | ||
| // 409 → stale document from a previous interrupted run. |
There was a problem hiding this comment.
we can have method to cleanup stale docs which can be reused i believe if needed in other places.
There was a problem hiding this comment.
agree. created new DeleteStaleDocumentsByName
|
Can we have a test run copy ? |
| // test can run successfully without manual intervention. | ||
| logger.Infof( | ||
| "[FAILURE-TEST][Digitize][TC-2] Submitting initial ingestion job to %s", | ||
| digitizeBaseURL, |
There was a problem hiding this comment.
The overall spec timeout is 20 minutes (digitizeFailureTestTimeout) but the ingestion wait inside is 15 minutes (digitizeFailureIngestionWaitTimeout). That leaves only 5 minutes for second submit + assertion. If ingestion is slow and takes the full 15 minutes, the test will time out before the assertion even runs. Please reduce the ingestion wait to 12 minutes so there is an 8 minute buffer for the rest of the test.
There was a problem hiding this comment.
agree. Valid point. done
There was a problem hiding this comment.
I guess for such testing, we can use simpler 1page pdf files to fasten up the testing. I have single page doc and can share with you.
| return nil, fmt.Errorf("timeout waiting for job %s to reach in_progress after %s", jobID, timeout) | ||
| } | ||
|
|
||
| if ctx.Err() != nil { |
There was a problem hiding this comment.
When GetJobStatus returns a network error this loop keeps retrying until the full 10 minute timeout is exhausted. If the service is down, this will block the test slot for 10 minutes before failing. Please add a consecutive-error counter — for example, if GetJobStatus fails 5 times in a row without a single success, return an error immediately instead of waiting for the timeout.
There was a problem hiding this comment.
Good point. modified the code accordingly.
ad2e1d8 to
74ae5ab
Compare
|
@Abhishek-Kushwaha1 Testcase results were attached to the corresponding Jira task |
Signed-off-by: Vijay Vinnakota <vijay.vinnakota@ibm.com>
Signed-off-by: Vijay Vinnakota <vijay.vinnakota@ibm.com>
Signed-off-by: Vijay Vinnakota <vijay.vinnakota@ibm.com>
Signed-off-by: Vijay Vinnakota <vijay.vinnakota@ibm.com>
74ae5ab to
aa983f8
Compare
Testcase results were added to the Jira ticket
https://jsw.ibm.com/browse/AISERVICES-1591?filter=459681