Project: mule
Issue MULE-6826: Fix flaky unit test: DateTimeTestCase
DateTimeTestCase has many test that are flaky because they depend on the current system time. For example: {code} @Test public void seconds() { assertEquals(Calendar.getInstance(TimeZone.getTimeZone("UTC")).get(Calendar.SECOND), now.getSeconds()); } {code} Problem is that there are two different calls to obtain the current second, so they could obtain different values from time to time. Same problem exist in many tests, but as they are checking for minutes, hours, days, weeks, etc they less probable to fail, but they are still flaky in theory.
Story points: 1