Fix test_cohereInference_withDifferent_postProcessFunction flaky test#3666
Fix test_cohereInference_withDifferent_postProcessFunction flaky test#3666nathaliellenaa wants to merge 2 commits intoopensearch-project:mainfrom
Conversation
Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com>
mingshl
left a comment
There was a problem hiding this comment.
Thanks @nathaliellenaa for picking this up. LGTM, let's see if the integ pass and verify this fix.
after this PR is merged, you can rebase your the other branch and push again, it should unblock your another PR
| assertEquals(errorMsg, 1, output.size()); | ||
| assertTrue(errorMsg, output.get(0) instanceof Map); | ||
| validateOutput(errorMsg, (Map) output.get(0), DATA_TYPE.get(postProcessFunction)); | ||
| if (output != null && DATA_TYPE != null) { |
There was a problem hiding this comment.
DATA_TYPE is a static variable which already have values in it. So checking null for DATA_TYPE isn't adding any value because it will not be null.
There was a problem hiding this comment.
Got it, I'll remove the null check for DATA_TYPE.
Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com>
| assertEquals(errorMsg, 1, output.size()); | ||
| assertTrue(errorMsg, output.get(0) instanceof Map); | ||
| validateOutput(errorMsg, (Map) output.get(0), DATA_TYPE.get(postProcessFunction)); | ||
| if (output != null) { |
There was a problem hiding this comment.
Here adding null check for output won't make any difference. If output is null, it would have thrown NullPointerException at line number 79 - output.size().
Here actual issue is in line number 91, outputList.get(0)).get("data_type"). This is becoming null.
There was a problem hiding this comment.
I don't think we need this PR as the failure IT should already fixed, please check this comment: #3628 (comment)
|
Closing this PR since the fix is already made in this PR. |
Description
Fix
test_cohereInference_withDifferent_postProcessFunctionflaky test due toRelated Issues
Resolves #3628 (comment)
Check List
--signoff.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.