Modify

#19889 closed defect (fixed)

CI contains thousands of "Keystroke … is already assigned to …, will be overridden by …" warnings

Reported by: simon04 Owned by: simon04
Priority: normal Milestone: 21.03
Component: Unit tests Version:
Keywords: Cc:

Attachments (0)

Change History (9)

comment:1 Changed 21 months ago by stoecker

Not sure what to do against it. Happens when you really install all the plugins :-)

comment:2 Changed 21 months ago by simon04

Not a single plugin is installed. However, using org.openstreetmap.josm.testutils.JOSMTestRules#main() causes org.openstreetmap.josm.gui.MainApplication to be initialised before each unit test.

comment:3 Changed 20 months ago by Don-vip

Milestone: 20.1020.11

Maybe org.openstreetmap.josm.testutils.JOSMTestRules#main() is no longer needed now we have JMockit?

comment:4 Changed 20 months ago by Don-vip

Milestone: 20.1120.12

Milestone renamed

comment:5 Changed 18 months ago by simon04

Milestone: 20.12Longterm

comment:6 Changed 15 months ago by simon04

Milestone: Longterm21.04
Owner: changed from team to simon04
Status: newassigned

This fixes many log messages. Any objections?

  • test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java

    diff --git a/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java b/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java
    index 8012c286a..7afa85a3c 100644
    a b public class MainApplicationTest { 
    6666     * Make sure {@link MainApplication#contentPanePrivate} is initialized.
    6767     */
    6868    public static void initContentPane() {
    69         if (MainApplication.contentPanePrivate == null) {
    70             MainApplication.contentPanePrivate = new JPanel(new BorderLayout());
    71         }
     69        // init every time to avoid "Keystroke %s is already assigned to %s"
     70        MainApplication.contentPanePrivate = new JPanel(new BorderLayout());
    7271    }
    7372
    7473    /**
    public class MainApplicationTest { 
    103102     * Make sure {@link MainApplication#toolbar} is initialized.
    104103     */
    105104    public static void initToolbar() {
    106         if (MainApplication.toolbar == null) {
    107             MainApplication.toolbar = new ToolbarPreferences();
    108         }
     105        // init every time to avoid "Registered toolbar action"
     106        MainApplication.toolbar = new ToolbarPreferences();
    109107    }
    110108
    111109    @SuppressFBWarnings(value = "DM_DEFAULT_ENCODING")

The following log messages remain:

2021-03-29 20:09:29.926 INFO: Reassigning macOS shortcut 'help:search-items' from Meta to Ctrl because of conflict with ⌘+␣
2021-03-29 20:09:29.927 INFO: Silent shortcut conflict: 'help:search-items' moved by 'apple-reserved-01' to '⌃+␣'.
2021-03-29 20:09:29.927 INFO: Reassigning macOS shortcut 'core:historyinfo' from Meta to Ctrl because of conflict with ⌘+H
2021-03-29 20:09:29.927 INFO: Silent shortcut conflict: 'core:historyinfo' moved by 'system:hide' to '⌃+H'.
2021-03-29 20:09:30.100 INFO: Reassigning macOS shortcut 'file:downloadreferrers' from Meta to Ctrl because of conflict with ⌘+⌥+D
2021-03-29 20:09:30.100 INFO: Silent shortcut conflict: 'file:downloadreferrers' moved by 'apple-reserved-42' to '⌃+⌥+D'.

Too bad we cannot use java.util.logging.Logger#setLevel for the org.openstreetmap.josm.tools.Shortcut logger only...

comment:7 Changed 15 months ago by Don-vip

No objection. It's only test code :)

comment:8 Changed 15 months ago by simon04

Milestone: 21.0421.03

comment:9 Changed 15 months ago by simon04

Resolution: fixed
Status: assignedclosed

In 17687/josm:

fix #19889 - CI contains thousands of "Keystroke ... is already assigned to ..., will be overridden by ..." warnings

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain simon04.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.