You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by Philippe Mouawad <p....@ubik-ingenierie.com> on 2017/12/21 21:02:08 UTC

Weird Test failure

Hello,
We have since few days a failure in this method which didn't change neither
in test function nor in the test:

   - TestTimeShiftFunction#testNowWithComplexPeriod


It seems something strange happens with Duration#parse.

   - P10DT-1H-5M5S

Reading :

   - https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html#parse

I would expect this to means :

   - Plus 10 days, -1 hours, -5 minutes + 5s

But it ends up becoming:

   - 860105 seconds

Is this a Java bug , or something I am missing ?

Thanks
-- 
Cordialement.
Philippe Mouawad.
Ubik-Ingénierie

UBIK LOAD PACK Web Site <http://www.ubikloadpack.com/>

UBIK LOAD PACK on TWITTER <https://twitter.com/ubikloadpack>

Re: Weird Test failure

Posted by Graham Russell <gr...@ham1.co.uk>.
If someone implementing the unit tests (and Felix) made that mistake is
there a way for us to prevent users making the same mistake?

On Sat, 30 Dec 2017 at 23:39 Felix Schumacher <
felix.schumacher@internetallee.de> wrote:

>
>
> Am 30. Dezember 2017 16:06:34 MEZ schrieb Philippe Mouawad <
> philippe.mouawad@gmail.com>:
> >Hi,
> >Should be fixed, please review.
>
> Looks good.
>
> I constructed a simple jmx file to test timeShift and stumbled over the
> same formatting problems (using Y instead of y) - but good no other
> concurrency problem.
>
> Regards,
>  Felix
>
> >
> >Thanks
> >
> >On Sat, Dec 30, 2017 at 3:29 PM, Philippe Mouawad <
> >philippe.mouawad@gmail.com> wrote:
> >
> >> It is an issue with formatter creation:
> >> - https://bz.apache.org/bugzilla/show_bug.cgi?id=61938
> >>
> >> Regards
> >>
> >> On Sat, Dec 30, 2017 at 3:17 PM, Philippe Mouawad <
> >> philippe.mouawad@gmail.com> wrote:
> >>
> >>> Hi Felix,
> >>> You can see a new strange behaviour today with last test failure.
> >>> Regards
> >>>
> >>> On Fri, Dec 22, 2017 at 9:27 PM, Philippe Mouawad <
> >>> philippe.mouawad@gmail.com> wrote:
> >>>
> >>>> Hi Felix,
> >>>> I have just commited
> >TestTimeShiftFunction#testPotentialBugWithComplexPeriod
> >>>> to show you the problem I describe.
> >>>> As you can see the jmeter tests are  now running fine just because
> >we
> >>>> moved 1 day.
> >>>>
> >>>> Regards
> >>>>
> >>>> On Fri, Dec 22, 2017 at 9:52 AM, Felix Schumacher <
> >>>> felix.schumacher@internetallee.de> wrote:
> >>>>
> >>>>> Am 21.12.2017 um 22:02 schrieb Philippe Mouawad:
> >>>>>
> >>>>>> Hello,
> >>>>>> We have since few days a failure in this method which didn't
> >change
> >>>>>> neither
> >>>>>> in test function nor in the test:
> >>>>>>
> >>>>>>     - TestTimeShiftFunction#testNowWithComplexPeriod
> >>>>>>
> >>>>>>
> >>>>>> It seems something strange happens with Duration#parse.
> >>>>>>
> >>>>>>     - P10DT-1H-5M5S
> >>>>>>
> >>>>>> Reading :
> >>>>>>
> >>>>>>     -
> >https://docs.oracle.com/javase/8/docs/api/java/time/Duration
> >>>>>> .html#parse
> >>>>>>
> >>>>>> I would expect this to means :
> >>>>>>
> >>>>>>     - Plus 10 days, -1 hours, -5 minutes + 5s
> >>>>>>
> >>>>>> But it ends up becoming:
> >>>>>>
> >>>>>>     - 860105 seconds
> >>>>>>
> >>>>> If I type "10*(24*60*60)-1*(60*60)-5*(60)+5" into bc it spits out
> >>>>> "860105" which seems to be the same result. So I guess java and
> >the
> >>>>> documentation is correct.
> >>>>>
> >>>>> What did you expect?
> >>>>>
> >>>>> Felix
> >>>>>
> >>>>>
> >>>>>
> >>>>>> Is this a Java bug , or something I am missing ?
> >>>>>>
> >>>>>> Thanks
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>> --
> >>>> Cordialement.
> >>>> Philippe Mouawad.
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>> --
> >>> Cordialement.
> >>> Philippe Mouawad.
> >>>
> >>>
> >>>
> >>
> >>
> >> --
> >> Cordialement.
> >> Philippe Mouawad.
> >>
> >>
> >>
>

Re: Weird Test failure

Posted by Felix Schumacher <fe...@internetallee.de>.

Am 30. Dezember 2017 16:06:34 MEZ schrieb Philippe Mouawad <ph...@gmail.com>:
>Hi,
>Should be fixed, please review.

Looks good.

I constructed a simple jmx file to test timeShift and stumbled over the same formatting problems (using Y instead of y) - but good no other concurrency problem.

Regards, 
 Felix 

>
>Thanks
>
>On Sat, Dec 30, 2017 at 3:29 PM, Philippe Mouawad <
>philippe.mouawad@gmail.com> wrote:
>
>> It is an issue with formatter creation:
>> - https://bz.apache.org/bugzilla/show_bug.cgi?id=61938
>>
>> Regards
>>
>> On Sat, Dec 30, 2017 at 3:17 PM, Philippe Mouawad <
>> philippe.mouawad@gmail.com> wrote:
>>
>>> Hi Felix,
>>> You can see a new strange behaviour today with last test failure.
>>> Regards
>>>
>>> On Fri, Dec 22, 2017 at 9:27 PM, Philippe Mouawad <
>>> philippe.mouawad@gmail.com> wrote:
>>>
>>>> Hi Felix,
>>>> I have just commited
>TestTimeShiftFunction#testPotentialBugWithComplexPeriod
>>>> to show you the problem I describe.
>>>> As you can see the jmeter tests are  now running fine just because
>we
>>>> moved 1 day.
>>>>
>>>> Regards
>>>>
>>>> On Fri, Dec 22, 2017 at 9:52 AM, Felix Schumacher <
>>>> felix.schumacher@internetallee.de> wrote:
>>>>
>>>>> Am 21.12.2017 um 22:02 schrieb Philippe Mouawad:
>>>>>
>>>>>> Hello,
>>>>>> We have since few days a failure in this method which didn't
>change
>>>>>> neither
>>>>>> in test function nor in the test:
>>>>>>
>>>>>>     - TestTimeShiftFunction#testNowWithComplexPeriod
>>>>>>
>>>>>>
>>>>>> It seems something strange happens with Duration#parse.
>>>>>>
>>>>>>     - P10DT-1H-5M5S
>>>>>>
>>>>>> Reading :
>>>>>>
>>>>>>     -
>https://docs.oracle.com/javase/8/docs/api/java/time/Duration
>>>>>> .html#parse
>>>>>>
>>>>>> I would expect this to means :
>>>>>>
>>>>>>     - Plus 10 days, -1 hours, -5 minutes + 5s
>>>>>>
>>>>>> But it ends up becoming:
>>>>>>
>>>>>>     - 860105 seconds
>>>>>>
>>>>> If I type "10*(24*60*60)-1*(60*60)-5*(60)+5" into bc it spits out
>>>>> "860105" which seems to be the same result. So I guess java and
>the
>>>>> documentation is correct.
>>>>>
>>>>> What did you expect?
>>>>>
>>>>> Felix
>>>>>
>>>>>
>>>>>
>>>>>> Is this a Java bug , or something I am missing ?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Cordialement.
>>>> Philippe Mouawad.
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Cordialement.
>>> Philippe Mouawad.
>>>
>>>
>>>
>>
>>
>> --
>> Cordialement.
>> Philippe Mouawad.
>>
>>
>>

Re: Weird Test failure

Posted by Philippe Mouawad <ph...@gmail.com>.
Hi,
Should be fixed, please review.

Thanks

On Sat, Dec 30, 2017 at 3:29 PM, Philippe Mouawad <
philippe.mouawad@gmail.com> wrote:

> It is an issue with formatter creation:
> - https://bz.apache.org/bugzilla/show_bug.cgi?id=61938
>
> Regards
>
> On Sat, Dec 30, 2017 at 3:17 PM, Philippe Mouawad <
> philippe.mouawad@gmail.com> wrote:
>
>> Hi Felix,
>> You can see a new strange behaviour today with last test failure.
>> Regards
>>
>> On Fri, Dec 22, 2017 at 9:27 PM, Philippe Mouawad <
>> philippe.mouawad@gmail.com> wrote:
>>
>>> Hi Felix,
>>> I have just commited TestTimeShiftFunction#testPotentialBugWithComplexPeriod
>>> to show you the problem I describe.
>>> As you can see the jmeter tests are  now running fine just because we
>>> moved 1 day.
>>>
>>> Regards
>>>
>>> On Fri, Dec 22, 2017 at 9:52 AM, Felix Schumacher <
>>> felix.schumacher@internetallee.de> wrote:
>>>
>>>> Am 21.12.2017 um 22:02 schrieb Philippe Mouawad:
>>>>
>>>>> Hello,
>>>>> We have since few days a failure in this method which didn't change
>>>>> neither
>>>>> in test function nor in the test:
>>>>>
>>>>>     - TestTimeShiftFunction#testNowWithComplexPeriod
>>>>>
>>>>>
>>>>> It seems something strange happens with Duration#parse.
>>>>>
>>>>>     - P10DT-1H-5M5S
>>>>>
>>>>> Reading :
>>>>>
>>>>>     - https://docs.oracle.com/javase/8/docs/api/java/time/Duration
>>>>> .html#parse
>>>>>
>>>>> I would expect this to means :
>>>>>
>>>>>     - Plus 10 days, -1 hours, -5 minutes + 5s
>>>>>
>>>>> But it ends up becoming:
>>>>>
>>>>>     - 860105 seconds
>>>>>
>>>> If I type "10*(24*60*60)-1*(60*60)-5*(60)+5" into bc it spits out
>>>> "860105" which seems to be the same result. So I guess java and the
>>>> documentation is correct.
>>>>
>>>> What did you expect?
>>>>
>>>> Felix
>>>>
>>>>
>>>>
>>>>> Is this a Java bug , or something I am missing ?
>>>>>
>>>>> Thanks
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Cordialement.
>>> Philippe Mouawad.
>>>
>>>
>>>
>>
>>
>> --
>> Cordialement.
>> Philippe Mouawad.
>>
>>
>>
>
>
> --
> Cordialement.
> Philippe Mouawad.
>
>
>


-- 
Cordialement.
Philippe Mouawad.

Re: Weird Test failure

Posted by Philippe Mouawad <ph...@gmail.com>.
It is an issue with formatter creation:
- https://bz.apache.org/bugzilla/show_bug.cgi?id=61938

Regards

On Sat, Dec 30, 2017 at 3:17 PM, Philippe Mouawad <
philippe.mouawad@gmail.com> wrote:

> Hi Felix,
> You can see a new strange behaviour today with last test failure.
> Regards
>
> On Fri, Dec 22, 2017 at 9:27 PM, Philippe Mouawad <
> philippe.mouawad@gmail.com> wrote:
>
>> Hi Felix,
>> I have just commited TestTimeShiftFunction#testPotentialBugWithComplexPeriod
>> to show you the problem I describe.
>> As you can see the jmeter tests are  now running fine just because we
>> moved 1 day.
>>
>> Regards
>>
>> On Fri, Dec 22, 2017 at 9:52 AM, Felix Schumacher <
>> felix.schumacher@internetallee.de> wrote:
>>
>>> Am 21.12.2017 um 22:02 schrieb Philippe Mouawad:
>>>
>>>> Hello,
>>>> We have since few days a failure in this method which didn't change
>>>> neither
>>>> in test function nor in the test:
>>>>
>>>>     - TestTimeShiftFunction#testNowWithComplexPeriod
>>>>
>>>>
>>>> It seems something strange happens with Duration#parse.
>>>>
>>>>     - P10DT-1H-5M5S
>>>>
>>>> Reading :
>>>>
>>>>     - https://docs.oracle.com/javase/8/docs/api/java/time/Duration
>>>> .html#parse
>>>>
>>>> I would expect this to means :
>>>>
>>>>     - Plus 10 days, -1 hours, -5 minutes + 5s
>>>>
>>>> But it ends up becoming:
>>>>
>>>>     - 860105 seconds
>>>>
>>> If I type "10*(24*60*60)-1*(60*60)-5*(60)+5" into bc it spits out
>>> "860105" which seems to be the same result. So I guess java and the
>>> documentation is correct.
>>>
>>> What did you expect?
>>>
>>> Felix
>>>
>>>
>>>
>>>> Is this a Java bug , or something I am missing ?
>>>>
>>>> Thanks
>>>>
>>>
>>>
>>>
>>
>>
>> --
>> Cordialement.
>> Philippe Mouawad.
>>
>>
>>
>
>
> --
> Cordialement.
> Philippe Mouawad.
>
>
>


-- 
Cordialement.
Philippe Mouawad.

Re: Weird Test failure

Posted by Philippe Mouawad <ph...@gmail.com>.
Hi Felix,
You can see a new strange behaviour today with last test failure.
Regards

On Fri, Dec 22, 2017 at 9:27 PM, Philippe Mouawad <
philippe.mouawad@gmail.com> wrote:

> Hi Felix,
> I have just commited TestTimeShiftFunction#testPotentialBugWithComplexPeriod
> to show you the problem I describe.
> As you can see the jmeter tests are  now running fine just because we
> moved 1 day.
>
> Regards
>
> On Fri, Dec 22, 2017 at 9:52 AM, Felix Schumacher <felix.schumacher@
> internetallee.de> wrote:
>
>> Am 21.12.2017 um 22:02 schrieb Philippe Mouawad:
>>
>>> Hello,
>>> We have since few days a failure in this method which didn't change
>>> neither
>>> in test function nor in the test:
>>>
>>>     - TestTimeShiftFunction#testNowWithComplexPeriod
>>>
>>>
>>> It seems something strange happens with Duration#parse.
>>>
>>>     - P10DT-1H-5M5S
>>>
>>> Reading :
>>>
>>>     - https://docs.oracle.com/javase/8/docs/api/java/time/Duration
>>> .html#parse
>>>
>>> I would expect this to means :
>>>
>>>     - Plus 10 days, -1 hours, -5 minutes + 5s
>>>
>>> But it ends up becoming:
>>>
>>>     - 860105 seconds
>>>
>> If I type "10*(24*60*60)-1*(60*60)-5*(60)+5" into bc it spits out
>> "860105" which seems to be the same result. So I guess java and the
>> documentation is correct.
>>
>> What did you expect?
>>
>> Felix
>>
>>
>>
>>> Is this a Java bug , or something I am missing ?
>>>
>>> Thanks
>>>
>>
>>
>>
>
>
> --
> Cordialement.
> Philippe Mouawad.
>
>
>


-- 
Cordialement.
Philippe Mouawad.

Re: Weird Test failure

Posted by Philippe Mouawad <ph...@gmail.com>.
Hi Felix,
I have just commited
TestTimeShiftFunction#testPotentialBugWithComplexPeriod to show you the
problem I describe.
As you can see the jmeter tests are  now running fine just because we moved
1 day.

Regards

On Fri, Dec 22, 2017 at 9:52 AM, Felix Schumacher <
felix.schumacher@internetallee.de> wrote:

> Am 21.12.2017 um 22:02 schrieb Philippe Mouawad:
>
>> Hello,
>> We have since few days a failure in this method which didn't change
>> neither
>> in test function nor in the test:
>>
>>     - TestTimeShiftFunction#testNowWithComplexPeriod
>>
>>
>> It seems something strange happens with Duration#parse.
>>
>>     - P10DT-1H-5M5S
>>
>> Reading :
>>
>>     - https://docs.oracle.com/javase/8/docs/api/java/time/Duration
>> .html#parse
>>
>> I would expect this to means :
>>
>>     - Plus 10 days, -1 hours, -5 minutes + 5s
>>
>> But it ends up becoming:
>>
>>     - 860105 seconds
>>
> If I type "10*(24*60*60)-1*(60*60)-5*(60)+5" into bc it spits out
> "860105" which seems to be the same result. So I guess java and the
> documentation is correct.
>
> What did you expect?
>
> Felix
>
>
>
>> Is this a Java bug , or something I am missing ?
>>
>> Thanks
>>
>
>
>


-- 
Cordialement.
Philippe Mouawad.

Re: Weird Test failure

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 21.12.2017 um 22:02 schrieb Philippe Mouawad:
> Hello,
> We have since few days a failure in this method which didn't change neither
> in test function nor in the test:
>
>     - TestTimeShiftFunction#testNowWithComplexPeriod
>
>
> It seems something strange happens with Duration#parse.
>
>     - P10DT-1H-5M5S
>
> Reading :
>
>     - https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html#parse
>
> I would expect this to means :
>
>     - Plus 10 days, -1 hours, -5 minutes + 5s
>
> But it ends up becoming:
>
>     - 860105 seconds
If I type "10*(24*60*60)-1*(60*60)-5*(60)+5" into bc it spits out 
"860105" which seems to be the same result. So I guess java and the 
documentation is correct.

What did you expect?

Felix

>
> Is this a Java bug , or something I am missing ?
>
> Thanks