Skip to content

Conversation

@shreemaan-abhishek
Copy link
Contributor

@shreemaan-abhishek shreemaan-abhishek commented Jan 7, 2026

Description

This PR attempts to enhance the reliablity of lago test. Please check comments for detailed information.

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

Signed-off-by: Abhishek Choudhary <shreemaan.abhishek@gmail.com>
test_dir:
- t/plugin/[a-k]*
- t/stream-plugin t/plugin/[l-z]*
- t/stream-plugin t/plugin/[l-z]*.t
Copy link
Contributor Author

Choose a reason for hiding this comment

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

needed to fix this unnecessary warning:

Image

Copy link
Member

Choose a reason for hiding this comment

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

Does the t/plugin/[a-k]* line above not need to be modified?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, and I have done that.

).resolves.not.toThrow()
console.log(`[${new Date().toLocaleTimeString()}] created consumer`)
});
}, 5 * 1000);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this test block was missing a timeout

local ok, stdout, stderr, reason, status = shell.run([[ $exec_snippet ]], $stdin, @{[($timeout-1)*1000]}, $max_size)
if not ok then
ngx.log(ngx.WARN, "failed to execute the script with status: " .. (status or "nil ") .. ", reason: " .. (reason or "nil ") .. ", stderr: " .. (stderr or "nil "))
ngx.log(ngx.WARN, "failed to execute the script with status: " .. (status or "nil ") .. ", reason: " .. (reason or "nil ") .. ", stdout: " .. (stdout or "nil ") .. ", stderr: " .. (stderr or "nil "))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we found that when shell.run failed the error log line got executed however, the response body was still empty, due to which we were unable to examine the stdout. So we add the stdout to this log line.

Image

nic-6443
nic-6443 previously approved these changes Jan 7, 2026
@shreemaan-abhishek shreemaan-abhishek marked this pull request as ready for review January 7, 2026 09:46
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. github_actions Pull requests that update GitHub Actions code labels Jan 7, 2026
Signed-off-by: Abhishek Choudhary <shreemaan.abhishek@gmail.com>
@nic-6443 nic-6443 requested a review from Baoyuantop January 8, 2026 08:29
@LiteSun LiteSun requested a review from membphis January 8, 2026 09:13
@LiteSun LiteSun merged commit 6498ed6 into apache:master Jan 8, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants