https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43249 --- Comment #17 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- (In reply to Marcel de Rooy from comment #16)
I was looking at this report at the end of the KohaCon. And I was not convinced by the unit tests.
We mock the sub running by something that looks overcomplicated. In a number of cases we could just return 1 || true or return e.g. 3 for prep_report() total_running_reports_per_instance_limit, etc.
Or you could argue that we are actually only testing our mocked routine since it is too hard to test the real running sub. But that does not make much sense? Yeah, 5 > 3. But we knew that, right?
I don't disagree, but I am not sure how to test this properly - if we try with Cypress it depends on having several plack workers and is subject to race conditions. I tried with forking and wasn't able to solve it easily. Do you have a suggestion? -- You are receiving this mail because: You are watching all bug changes.