You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by bu...@apache.org on 2007/05/10 15:20:47 UTC

DO NOT REPLY [Bug 42379] New: - GUI JUnit tests fails when test are executed in Locale different from en_US

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42379>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42379

           Summary: GUI JUnit tests fails when test are executed in Locale
                    different from en_US
           Product: JMeter
           Version: 2.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P3
         Component: HTTP
        AssignedTo: jmeter-dev@jakarta.apache.org
        ReportedBy: alf@i100.no


If you run the Ant target for executing the JMeter unit tests, and your JVM
Locale is for example "no", or any other value than "en", you will get more than
10 failures looking like :

[java] 10)
GUIComponents1(org.apache.jmeter.junit.JMeterTest)junit.framework.ComparisonFailure:
Name should be same as static label for
org.apache.jmeter.threads.gui.ThreadGroupGui expected:<...oup> but was:<...uppe>
[java]     at org.apache.jmeter.junit.JMeterTest.GUIComponents1(JMeterTest.java:416)

If you change the language setting in jmetertest.properties to "no", you will
see the same problems.

I think this is caused by the fact that the Locale in effect when the GUI
objects used in the org.apache.jmeter.junit.JMeterTest tests are the "default
locale", i.e. the Locale that JMeterUtils is initialized with. In my case it is
"no".

But then some tests changes the Locale, by calling JMeterUtils.setLocale, which
can be seen by looking at the jmeter-test.log.
So when the org.apache.jmeter.junit.JMeterTest.GUIComponents1 tests are actually
executed, another Locale is in effect, and therefore the tests fails.
In my case, the language in effect at this point is "en".

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 42379] - GUI JUnit tests fails when test are executed in Locale different from en_US

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42379>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42379


sebb@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From sebb@apache.org  2007-05-13 15:18 -------
Thanks - applied to SVN in r537665

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 42379] - GUI JUnit tests fails when test are executed in Locale different from en_US

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42379>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42379





------- Additional Comments From alf@i100.no  2007-05-10 06:24 -------
Created an attachment (id=20162)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=20162&action=view)
Suggested patch

The patch sets the Locale to English before GUI objects are created, and sets
the Locale to English before GUI objects in junit tests which fails are tested.


With this patch, the GUI Junit tests passed when I run with my default JVM
langauge, "no".

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org