Problem in test for timeShift function
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.3k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 5
Description
@mawasak ([Bug 65217](https://bz.apache.org/bugzilla//show_bug.cgi?id=65217&redirect=false)):
It seems that TestTimeShiftFunction.testNowWithComplexPeriod() report error when is running during near the day of the time change (Daylight Saving Time).
I will look at this.
Examples:
https://github.com/apache/jmeter/pull/654#issuecomment-811214471
Travis log:
https://travis-ci.com/github/apache/jmeter/jobs/494670417
FAILURE 0,2sec, org.apache.jmeter.functions.TestTimeShiftFunction > testNowWithComplexPeriod()
java.lang.AssertionError:
Expected: the date is within 1 Seconds of ven., 09 avr. 2021 02:29:44.486 PM
but: the date is ven., 09 avr. 2021 01:29:44.000 PM and 3600 Seconds different
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
at org.apache.jmeter.functions.TestTimeShiftFunction.testNowWithComplexPeriod(TestTimeShiftFunction.java:116)
I also saw this error during my test. During change from CET to CEST:
Expected: the date is within 1 Seconds of Tue, 06 Apr 2021 05:31:16.836 PM
but: the date is Tue, 06 Apr 2021 06:31:16.000 PM and 3599 Seconds different
java.lang.AssertionError:
Expected: the date is within 1 Seconds of Tue, 06 Apr 2021 05:31:16.836 PM
but: the date is Tue, 06 Apr 2021 06:31:16.000 PM and 3599 Seconds different
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
at org.apache.jmeter.functions.TestTimeShiftFunction.testNowWithComplexPeriod(TestTimeShiftFunction.java:116)
Severity: minor
OS: All
Contributor guide
Assessment
This issue has not been assessed yet.