Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-4012

Several tests failed when running not in GMT+02:00 time zone

      Affected Module: camunda-spin-dataformat-xml-dom

      Validation file org/camunda/spin/xml/validation_example.xml contains order-details date value for time zone GMT+02:00:

      <order-details>
        <ns2:date>2015-04-04T00:00:00+02:00</ns2:date>
      

      Running tests in not GMT+02:00 time zone causes following tests to be failed:

      XmlDomMapJavaToXmlGroovyTest>XmlDomMapJavaToXmlScriptTest.shouldMapJavaToXml:35 expected:<...015-04-04T00:00:00+0[2]:00</ns2:date>
           ...> but was:<...015-04-04T00:00:00+0[3]:00</ns2:date>
           ...>
        XmlDomMapJavaToXmlPythonTest>XmlDomMapJavaToXmlScriptTest.shouldMapJavaToXml:35 expected:<...015-04-04T00:00:00+0[2]:00</ns2:date>
           ...> but was:<...015-04-04T00:00:00+0[3]:00</ns2:date>
           ...>
        XmlDomMapJavaToXmlRubyTest>XmlDomMapJavaToXmlScriptTest.shouldMapJavaToXml:35 expected:<...015-04-04T00:00:00+0[2]:00</ns2:date>
           ...> but was:<...015-04-04T00:00:00+0[3]:00</ns2:date>
           ...>
        XmlDomMapJavaToXmlTest.shouldMapJavaToXml:44 expected:<...015-04-04T00:00:00+0[2]:00</ns2:date>
           ...> but was:<...015-04-04T00:00:00+0[3]:00</ns2:date>
           ...>
      

      Possible solution could be the usage of -Duser.timezone=GMT+02:00 argument in maven-surefire-plugin in camunda-spin-dataformat-xml-dom/pom.xml file:

      <argLine>-XX:PermSize=128m -XX:MaxPermSize=256m -Duser.timezone=GMT+02:00</argLine>
      

        This is the controller panel for Smart Panels app

            [CAM-4012] Several tests failed when running not in GMT+02:00 time zone

            Thanks for reporting.

            Any idea how to solve this?

            Robert Gimbel added a comment - Thanks for reporting. Any idea how to solve this?

            Adding -Duser.timezone=GMT+02:00 to <argLine> of maven-surefire-plugin in camunda-spin-dataformat-xml-dom/pom.xml file solves this issue:

                        <artifactId>maven-surefire-plugin</artifactId>
                        ...
                        <configuration>
                          <argLine>-XX:PermSize=128m -XX:MaxPermSize=256m -Duser.timezone=GMT+02:00</argLine>
                        ...
            

            Alexander Tyatenkov added a comment - Adding -Duser.timezone=GMT+02:00 to <argLine> of maven-surefire-plugin in camunda-spin-dataformat-xml-dom/ pom.xml file solves this issue: <artifactId> maven-surefire-plugin </artifactId> ... <configuration> <argLine> -XX:PermSize=128m -XX:MaxPermSize=256m -Duser.timezone=GMT+02:00 </argLine> ...

            Another solution would be the creation of additional TestRule.

            Maybe alter the maven-surefire-plugin looks better. If this is okay I could create a pull request with updated pom.xml file.

            Alexander Tyatenkov added a comment - Another solution would be the creation of additional TestRule. Maybe alter the maven-surefire-plugin looks better. If this is okay I could create a pull request with updated pom.xml file.

            Hi Alex,

            if you have the time please provide a pull request. I will test and merge it. Thanks again for reporting this issue.

            Cheers,
            Sebastian

            Sebastian Menski added a comment - Hi Alex , if you have the time please provide a pull request. I will test and merge it. Thanks again for reporting this issue. Cheers, Sebastian

              sebastian.menski Sebastian Menski
              Alex Alexander Tyatenkov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: