Skip to content

Digitization ft - #1282

Open
vijay-vin wants to merge 4 commits into
IBM:mainfrom
vijay-vin:digitizationFT
Open

Digitization ft#1282
vijay-vin wants to merge 4 commits into
IBM:mainfrom
vijay-vin:digitizationFT

Conversation

@vijay-vin

Copy link
Copy Markdown
Contributor

Testcase results were added to the Jira ticket
https://jsw.ibm.com/browse/AISERVICES-1591?filter=459681

@vijay-vin
vijay-vin requested a review from manju956 August 19, 2026 12:54
Comment on lines +28 to +45
// 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we can remove these comments as we have this in readme file already

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this interval sufficient?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

these comments are not needed as the logic is self explanatory IMO

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we can have method to cleanup stale docs which can be reused i believe if needed in other places.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

agree. created new DeleteStaleDocumentsByName

@Abhishek-Kushwaha1

Abhishek-Kushwaha1 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

agree. Valid point. done

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point. modified the code accordingly.

@vijay-vin

Copy link
Copy Markdown
Contributor Author

@Abhishek-Kushwaha1 Testcase results were attached to the corresponding Jira task
https://jsw.ibm.com/browse/AISERVICES-1591?filter=459681

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants