Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8261919: java/util/Locale/LocaleProvidersRun.java failed with "RuntimeException: Expected log was not emitted. LogRecord: null" #2683

Closed
wants to merge 2 commits into from

Conversation

@naotoj
Copy link
Member

@naotoj naotoj commented Feb 23, 2021

Please review the fix to this test case failure that occurs with the usage tracker enabled JRE.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8261919: java/util/Locale/LocaleProvidersRun.java failed with "RuntimeException: Expected log was not emitted. LogRecord: null"

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2683/head:pull/2683
$ git checkout pull/2683

…eException: Expected log was not emitted. LogRecord: null"
@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Feb 23, 2021

👋 Welcome back naoto! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr label Feb 23, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Feb 23, 2021

@naotoj The following labels will be automatically applied to this pull request:

  • core-libs
  • i18n

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@naotoj
Copy link
Member Author

@naotoj naotoj commented Feb 23, 2021

/label i18n core-libs

@openjdk
Copy link

@openjdk openjdk bot commented Feb 23, 2021

@naotoj The i18n label was already applied.
The core-libs label was already applied.

@mlbridge
Copy link

@mlbridge mlbridge bot commented Feb 23, 2021

Webrevs

@openjdk
Copy link

@openjdk openjdk bot commented Feb 23, 2021

@naotoj This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8261919: java/util/Locale/LocaleProvidersRun.java failed with "RuntimeException: Expected log was not emitted. LogRecord: null"

Reviewed-by: joehw, dfuchs

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 16 new commits pushed to the master branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Feb 23, 2021

// Set the root logger on loading the logging class
public static class LogConfig {
final static LogRecord[] lra = new LogRecord[1];
Copy link
Member

@dfuch dfuch Feb 23, 2021

I would suggest to use some multi-thread safe container rather than a simple array to store the LogRecord. For instance - a CopyOnWriteArrayList - or something like that. Also you may want to harden the test by allowing for the possibility that some other logging might have occurred, and search the list for the record you expect rather than assuming it will be the first and only one.
Otherwise looks good!

Copy link
Member Author

@naotoj naotoj Feb 23, 2021

Thanks, Daniel. Will update the fix as you suggested.

dfuch
dfuch approved these changes Feb 23, 2021
Copy link
Member

@dfuch dfuch left a comment

LGTM!

@naotoj
Copy link
Member Author

@naotoj naotoj commented Feb 24, 2021

/integrate

@openjdk openjdk bot closed this Feb 24, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Feb 24, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Feb 24, 2021

@naotoj Since your change was applied there have been 25 commits pushed to the master branch:

  • 2c99bad: 8261920: [AIX] jshell command throws java.io.IOError on non English locales
  • 8c07063: 8262259: Remove unused variable in MethodLiveness::BasicBlock::compute_gen_kill_single
  • 0d2dbd2: 8262027: Improve how HttpConnection detects a closed channel when taking/returning a connection to the pool
  • 382e38d: 8256438: AArch64: Implement match rules with ROR shift register value
  • fac37bf: 8262269: javadoc test TestGeneratedClasses.java fails on Windows
  • 3e13b66: 8262157: LingeredApp.startAppExactJvmOpts does not print app output when launching fails
  • c769388: 8262266: JDK-8262049 fails validate-source
  • 03e781b: 8262265: ProblemList jdk/javadoc/doclet/testGeneratedClasses/TestGeneratedClasses.java on Windows
  • c6eae06: 8262049: [TESTBUG] Fix TestReferenceRefersTo.java for Shenandoah IU mode
  • e5304b3: 8253409: Double-rounding possibility in float fma
  • ... and 15 more: https://git.openjdk.java.net/jdk/compare/aea474c48d6347c76ef95a20c52745e7949d1484...master

Your commit was automatically rebased without conflicts.

Pushed as commit 9d9ad96.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@naotoj naotoj deleted the JDK-8261919 branch Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants