jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Schumacher <>
Subject failing timeshift test
Date Sat, 07 Mar 2020 13:56:32 GMT
Hi all,

the test TestTimeShiftFunction#testNowWithComplexPeriod is failing
probably due to a transition period shortly before day light saving time

The code is

    public void testNowWithComplexPeriod() throws Exception {
        Collection<CompoundVariable> params =
makeParams("yyyy-MM-dd'T'HH:mm:ss", "", "P10DT-1H-5M5S", "");
        value = function.execute(result, null);
        LocalDateTime futureDate =;
        LocalDateTime futureDateFromFunction = LocalDateTime.parse(value);
        assertThat(futureDateFromFunction, within(1, ChronoUnit.SECONDS,

any idea how to make it aware of this transition period without giving
up a non timezone aware current time?

I thought of checking the day light settings for the locale for the
current and the future date, and calculating a difference if necessary.


View raw message