Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8205108

[testbug] Fix pattern matching in jstatd tests.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 11
    • Fix Version/s: 11
    • Component/s: tools
    • Labels:
      None
    • Resolved In Build:
      b19

      Backports

        Description

        The values for 'M' must be parsed as PERCENTAGE_OR_DASH.

        The parsing of numbers should not depend on the locale.



        Start jstat:
        [/.../bin/jstat -J-XX:+UsePerfData -J-Duser.language=en -gcutil 25387@... 250 5]
          S0 S1 E O M CCS YGC YGCT FGC FGCT CGC CGCT GCT
          0.00 0.00 86.67 0.00 - - 0 0.000 0 0.000 0 0.000 0.000
          0.00 0.00 86.67 0.00 - - 0 0.000 0 0.000 0 0.000 0.000
          0.00 0.00 86.67 0.00 - - 0 0.000 0 0.000 0 0.000 0.000

        java.text.ParseException: Unparseable number: "-"
        at java.base/java.text.NumberFormat.parse(NumberFormat.java:431)
        at JstatGCUtilParser$GcStatistics.verify(JstatGCUtilParser.java:125)
        at JstatGCUtilParser.parse(JstatGCUtilParser.java:162)
        at JstatdTest.verifyJstatOutput(JstatdTest.java:206)


        Start jstat:
        [/.../bin/jstat -J-XX:+UsePerfData -J-Duser.language=en -gcutil 52834@... 250 5]
          S0 S1 E O M CCS YGC YGCT FGC FGCT CGC CGCT GCT
          0,00 100,00 0,00 1,29 94,74 81,80 11 0,013 0 0,000 0 0,000 0,013
          0,00 100,00 0,00 43,41 94,79 81,80 13 0,015 0 0,000 0 0,000 0,015
          0,00 100,00 0,00 43,41 94,79 81,80 13 0,015 0 0,000 0 0,000 0,015

        java.lang.NumberFormatException: For input string: "0,00"
        at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054)
        at java.base/jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
        at java.base/java.lang.Double.parseDouble(Double.java:543)
        at JstatGCUtilParser$GcStatistics.verify(JstatGCUtilParser.java:111)
        at JstatGCUtilParser.parse(JstatGCUtilParser.java:148)

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                goetz Goetz Lindenmaier
                Reporter:
                goetz Goetz Lindenmaier
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: