Build: #797 was successful Scheduled with changes by 4 people

Build result summary

Details

Completed
Queue duration
1 second
Duration
25 seconds
Labels
None
Revision
6dc1a7451c3fc60a9687e7ebb31f197d8b443932 6dc1a7451c3fc60a9687e7ebb31f197d8b443932
Successful since
#1 ()

Code commits

Author Commit Message Commit date
teleivo <teleivo@users.noreply.github.com> teleivo <teleivo@users.noreply.github.com> 6dc1a7451c3fc60a9687e7ebb31f197d8b443932 6dc1a7451c3fc60a9687e7ebb31f197d8b443932 TRUNK-5816 Attempt fix failing HandlerTests on Windows
according to spotbugs
https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#obl-method-may-fail-to-clean-up-stream-or-resource-obl-unsatisfied-obligation
both Handlers that have failing tests on Windows are not cleaning up
InputStream's on their getObs() method

I am trying to close these streams since we know in the test the
ComplexData.data is an InputStream
teleivo <teleivo@users.noreply.github.com> teleivo <teleivo@users.noreply.github.com> aff6a214fe2a2ed3fe6da29799fc12eef21e94a2 aff6a214fe2a2ed3fe6da29799fc12eef21e94a2 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.
teleivo <teleivo@users.noreply.github.com> teleivo <teleivo@users.noreply.github.com> d5585afd4142a3facb1d12340e0c4588f0db6565 d5585afd4142a3facb1d12340e0c4588f0db6565 TRUNK-5816 powermock reflect is enough for api tests
to set the OpenmrsConstants for more info refer to
bc4adc1efaa488c889d3fd2ab61f8178b7e704b4
teleivo <teleivo@users.noreply.github.com> teleivo <teleivo@users.noreply.github.com> bc4adc1efaa488c889d3fd2ab61f8178b7e704b4 bc4adc1efaa488c889d3fd2ab61f8178b7e704b4 TRUNK-5816 Do not allow PowerMock tests in api package
since PowerMock does not run on JUnit 5 see
https://github.com/powermock/powermock/issues/929

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.
achilep <39851246+achilep@users.noreply.github.com> achilep <39851246+achilep@users.noreply.github.com> ca23425a3c6688edeee13a9609418f96e3865110 ca23425a3c6688edeee13a9609418f96e3865110 TRUNK-5817: Migrate web and webapp package tests to Junit 5 (#3378)
Co-authored-by: achilep <you@example.com>

Jira issues

IssueDescriptionStatus
Unknown Issue TypeTRUNK-5702Could not obtain issue details from Jira
Unknown Issue TypeTRUNK-5816Could not obtain issue details from Jira
Unknown Issue TypeTRUNK-5817Could not obtain issue details from Jira