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

Add flag to turn off generating a diff #1375

Open
ngufra opened this issue Jun 1, 2021 · 3 comments
Open

Add flag to turn off generating a diff #1375

ngufra opened this issue Jun 1, 2021 · 3 comments

Comments

@ngufra
Copy link

ngufra commented Jun 1, 2021

When the data is very large (response more than 1 MB long), the diff created using myers diff can take many minutes and hog the cpu. As we have multiple tests, this causes our test run to timeout after 1 hour.

We traced it to
val diff = generateFullDiff(actualBody.orEmpty(), contentType, expectedBody.valueAsString(), isJsonBody) in ResponseComparison.kt.

It would be valuable to use an alternate diff algorithm or disable it altogether.

Ronald Holshausen suggested we open an issue to track the change request.

@uglyog
Copy link
Member

uglyog commented Jun 5, 2021

I've added a system property to disable the diff calculation. It can either just be turned off, or set a size threshold so small payloads will still have diffs.

@ngufra
Copy link
Author

ngufra commented Jun 7, 2021

Many thanks for the quick implementation.

@uglyog
Copy link
Member

uglyog commented Jun 27, 2021

4.2.7 has been released

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

3 participants