karma-snapshot icon indicating copy to clipboard operation
karma-snapshot copied to clipboard

Snapshot comparison fails when snapshot is huge

Open hisivasankar opened this issue 7 years ago • 5 comments
trafficstars

Info: Number of tests: 3000+ snapshot size: 80 MB

Problem: In our environment, the socket gets disconnected while sending the snapshot of size 150+ MB.

I debugged and found the framework overrides karma.complete to send snapshot at the end.

Expectation: The socket should not be disconnected.

Ideas: I was just thinking if we can somehow pass the data to karma server as soon as a suite is completed which would avoid the overhead in the socket.

Any leads on how to fix this and where to look at would be helpful. I would be happy to make a PR for the same.

hisivasankar avatar Jul 20 '18 13:07 hisivasankar

Hi,

I have fixed this problem in my fork and published here

I would love to create a PR if you would accept.

Thanks :)

hisivasankar avatar Jul 23 '18 14:07 hisivasankar

Hi, sorry for the delayed response. If you want, I can transfer this repository and npm package to you, so you can properly maintain it.

localvoid avatar Aug 20 '18 08:08 localvoid

That sounds good but I would like to get some feedback on the changes I did. Could you at least check that and let me know what you think about the same?

hisivasankar avatar Aug 26 '18 17:08 hisivasankar

I have documented my changes briefly in this release

hisivasankar avatar Aug 26 '18 17:08 hisivasankar

I don't think that it is possible to find a nice solution for snapshot testing without rewriting Karma, so as long as it is working and solves the problem it should be fine.

localvoid avatar Aug 27 '18 08:08 localvoid