Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Allow tweaking TIME_MARGIN #280

Open
raif-s-naffah opened this issue Nov 2, 2024 · 0 comments
Open

Suggestion: Allow tweaking TIME_MARGIN #280

raif-s-naffah opened this issue Nov 2, 2024 · 0 comments

Comments

@raif-s-naffah
Copy link

hi there,

while running the tests suite i often get multiple similar requests interleaved by 1-sec. occasionally this pattern loops for a long time to the point i have to kill the process and start again.

even when it eventually stops, this causes the server's logs to increase unnecessarily and make debugging a lot harder.

the issue, me think, is in helper.js/genDelay(), specifically the line

} else if ((new Date(res.headers['x-experience-api-consistent-through'])).valueOf() + module.exports.getTimeMargin() >= time) {

which in turn relies on the global TIME_MARGIN that gets set early on when the harness starts. in my case this measure, taken first thing after the server starts, is always longer than subsequent POSTs.

replacing the else conditional w/ \

} else if ((new Date(res.headers['x-experience-api-consistent-through'])).valueOf() >= time) {

solves my problem.

may be allowing to (a) ignore the TIME_MARGIN or (b) adjusting it by a multiplier as command line options could be considered.

thanks + cheers;
rsn

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

No branches or pull requests

1 participant