Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-7296

Solve encoding issue in tests

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 5.6.5
    • None
    • None
    • None

      Problem

      The following two encoding test don't work anymore:

      JcrImportCommandTest#yamlImportUtf8IsNotDefaultPlatformEncoding()
      InspectorTest#dumpString()

      Cause

      This issue was caused when moving the main pipeline to AWS and let to igno
      The base cause of the issue is that maven uses the platform encoding which is "ANSI_X3.4-1968".

      Idea 1: Change platform encoding to UTF-8

      Although this would seem the most straight forward solution it turned out to be more complicated. The locale and encoding on AWS instances is already configured to be "en_US.UTF-8" and playing around with those configurations had no effect on the encoding used by maven.

      Idea 2: Set encoding on maven explicitly

      The MAVEN_OPTS in the global tools configuration of maven does not seem to be used in pipelines. The maven configuration has to be explicitly configured but should work otherwise.

      Solution

      What actually worked was Idea 1! See comments below to see why it seemed to not work.

        Acceptance criteria

              mmuehlebach Michael Mühlebach
              mmuehlebach Michael Mühlebach
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD