Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2413

Make sure that the browser's locale is set to Engligh for the integration tests

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.4
    • Fix Version/s: 5.4
    • Component/s: None

      Description

      I am trying to get the current tapestry source to build (compile and test) on my machine. I run into problems since my locale is german and some integrationtests fail to run when english is not the default locale in Firefox.

      On my jenkins server the build completes and all tests run successfully (machine with locale=en)

      I will try to fix the build on my machine and post a patch here.

      Last time i tried to get tapestry to build was approx. 1 year ago: http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Getting-current-tapestry-5-4-SNAPSHOT-head-running-in-eclipse-with-git-and-gradle-tt5718810.html

      1. TAP5-2413_patch.diff
        2 kB
        Felix Gonschorek

        Activity

        Hide
        bobharner Bob Harner added a comment -

        Yes, that's noted in the build instructions at http://tapestry.apache.org/building-tapestry-from-source.html – unfortunately you currently have to set Firefox's preferred language to English to get all the tests to pass. It would be great if you could provide a fix for that!

        Show
        bobharner Bob Harner added a comment - Yes, that's noted in the build instructions at http://tapestry.apache.org/building-tapestry-from-source.html – unfortunately you currently have to set Firefox's preferred language to English to get all the tests to pass. It would be great if you could provide a fix for that!
        Hide
        jkemnade Jochen Kemnade added a comment -

        Actually, I thought I had fixed that in aae91f0b802a65f69af377fa2854eb4488e457a2. Which tests are failing for you? Are we talking about Linux boxes?

        Show
        jkemnade Jochen Kemnade added a comment - Actually, I thought I had fixed that in aae91f0b802a65f69af377fa2854eb4488e457a2 . Which tests are failing for you? Are we talking about Linux boxes?
        Hide
        felixgonschorek Felix Gonschorek added a comment - - edited

        Hello Bob, hello Jochen,

        aae91f0b802a65f69af377fa2854eb4488e457a2 sets the LANG environment variable to "en_US.UTF-8". Selenium does not translates this to a Firefox profile setting (understandably) and starts Firefox in your default locale.

        For example, the test org.apache.tapestry5.beanvalidator.integration.TapestryBeanValidationIntegrationTests expects to be english text present to succeed. I can fix that with adding a firefox profile to tapestry-beanvalidator that changes the default locale of the firefox instance that is started by selenium to english. I will attach this patch as soon as all tests are green on my side.

        There are other tests failing in tapestry-core, as soon as i figure out why, i will add a patch.

        I am using Windows 8.1 with german locale.

        Show
        felixgonschorek Felix Gonschorek added a comment - - edited Hello Bob, hello Jochen, aae91f0b802a65f69af377fa2854eb4488e457a2 sets the LANG environment variable to "en_US.UTF-8". Selenium does not translates this to a Firefox profile setting (understandably) and starts Firefox in your default locale. For example, the test org.apache.tapestry5.beanvalidator.integration.TapestryBeanValidationIntegrationTests expects to be english text present to succeed. I can fix that with adding a firefox profile to tapestry-beanvalidator that changes the default locale of the firefox instance that is started by selenium to english. I will attach this patch as soon as all tests are green on my side. There are other tests failing in tapestry-core, as soon as i figure out why, i will add a patch. I am using Windows 8.1 with german locale.
        Hide
        jkemnade Jochen Kemnade added a comment -

        > I am using Windows 8.1 with german locale.
        Right, that's why it doesn't work. Apparently Windows ignores the LANG environment variable.

        Show
        jkemnade Jochen Kemnade added a comment - > I am using Windows 8.1 with german locale. Right, that's why it doesn't work. Apparently Windows ignores the LANG environment variable.
        Hide
        felixgonschorek Felix Gonschorek added a comment -

        With adding Firefox profile files (prefs.js) to tapestry-core, tapestry-beanvalidator, tapestry-kaptcha and tapestry-spring the build now works on my machine (Win 8, german locale, gradle clean test).

        Additionally i built it on our integration server (jenkins, ubuntu, english locale).

        Going to attach patch here

        Show
        felixgonschorek Felix Gonschorek added a comment - With adding Firefox profile files (prefs.js) to tapestry-core, tapestry-beanvalidator, tapestry-kaptcha and tapestry-spring the build now works on my machine (Win 8, german locale, gradle clean test). Additionally i built it on our integration server (jenkins, ubuntu, english locale). Going to attach patch here
        Hide
        felixgonschorek Felix Gonschorek added a comment -

        Patch to get integration tests run on non-english computers.
        I added the locales "en,fr,de" to firefox profile

        Show
        felixgonschorek Felix Gonschorek added a comment - Patch to get integration tests run on non-english computers. I added the locales "en,fr,de" to firefox profile
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit f0b50559dba4cedd28c8fc4ddcddbc16b84b7676 in tapestry-5's branch refs/heads/master from Felix Gonschorek
        [ https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;h=f0b5055 ]

        TAP5-2413 add Firefox profiles to use english as default locale on non-english machines to make integration tests work

        Show
        jira-bot ASF subversion and git services added a comment - Commit f0b50559dba4cedd28c8fc4ddcddbc16b84b7676 in tapestry-5's branch refs/heads/master from Felix Gonschorek [ https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;h=f0b5055 ] TAP5-2413 add Firefox profiles to use english as default locale on non-english machines to make integration tests work
        Hide
        jkemnade Jochen Kemnade added a comment -

        Thanks for the patch!

        Show
        jkemnade Jochen Kemnade added a comment - Thanks for the patch!
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in tapestry-trunk-freestyle #1346 (See https://builds.apache.org/job/tapestry-trunk-freestyle/1346/)
        TAP5-2413 add Firefox profiles to use english as default locale on non-english machines to make integration tests work (jochen.kemnade: rev f0b50559dba4cedd28c8fc4ddcddbc16b84b7676)

        • tapestry-spring/src/test/conf/ff_profile_template/prefs.js
        • tapestry-kaptcha/src/test/conf/ff_profile_template/prefs.js
        • tapestry-beanvalidator/src/test/conf/ff_profile_template/prefs.js
        • tapestry-core/src/test/conf/ff_profile_template/prefs.js
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in tapestry-trunk-freestyle #1346 (See https://builds.apache.org/job/tapestry-trunk-freestyle/1346/ ) TAP5-2413 add Firefox profiles to use english as default locale on non-english machines to make integration tests work (jochen.kemnade: rev f0b50559dba4cedd28c8fc4ddcddbc16b84b7676) tapestry-spring/src/test/conf/ff_profile_template/prefs.js tapestry-kaptcha/src/test/conf/ff_profile_template/prefs.js tapestry-beanvalidator/src/test/conf/ff_profile_template/prefs.js tapestry-core/src/test/conf/ff_profile_template/prefs.js

          People

          • Assignee:
            jkemnade Jochen Kemnade
            Reporter:
            felixgonschorek Felix Gonschorek
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development