TRUNK-5816 Disable failing HandlerTests on Windows
only for now. We need to replicate what developers are seeing on Windows
see discussion at https://talk.openmrs.org/t/tests-failing-in-core-on-windows/29471/16
the tests still run in our pipelines (Travis/Bamboo) which ensures that
the behaviour stays the same. This will at least unblock developers on
Windows until we find the root cause.
we should prevent new contributions from adding tests written with
PowerMock
We still rely on powermock-api-mockito2 to set the
public static final String OPENMRS_VERSION
of OpenmrsConstants during testing.
There might also be a way to replace this usage and simply use
reflection. That could be investigated at a later point.
Most importantly for our migration to JUnit 5 is that we prevent JUnit 4
tests (and therefore also PowerMock tests) from entering openmrs-core.
We should in general avoid reaching for services via the static Context
methods since that makes testing in isolation hard. Springs dependency
injection allows us to wonderfully configure our services during testing
and production. This is what we need to leverage instead of static
methods that need PowerMock during testing. This also just hides the
fact that a Service has certain dependencies and is an easy way out in
designing our system.