apache / apache/jmeter

File/Open recent menu issues

Open
#5,475 6 comments 0 reactions 0 assignees View on GitHub
os: All P2
Dominant language
Java
Stars
9.5k
Forks
2.3k
Avg merge
1d 22h
Merged PRs (30d)
5

Description

**eR@SeR** ([Bug 65032](https://bz.apache.org/bugzilla//show_bug.cgi?id=65032&redirect=false)):
Hello,

AFAIK, to remove jmx file from File/Open recent menu, the user must open the Registry Editor, navigate to Computer\HKEY_CURRENT_USER\Software\JavaSoft\Prefs\org\apache\jmeter\gui\action and find recent_file_x key to delete. There are few issues found:

Precondition: Close JMeter, Delete all recent_file_x keys (if any) using Registry Editor, start JMeter.

1. Open test1, test2 and test3.jmx from attachment. There should be 3 files in Recent menu - test1, test2 and test3, but they are missing (same is in the registry). That was working fine in version 5.3.

Jmeter 5.4.1 38f8738
Microsoft Windows 10 Enterprise 64-bit
java version "14.0.1" 2020-04-14

--------------------------------

Since issue 1 was not present in verion 5.3, I checked version 5.3 and found issues that might be reproducible in Jmeter 5.4.1 as well.

Precondition: Close JMeter, Delete all recent_file_x keys (if any) using Registry Editor, start JMeter.

2. Open test1, test2 and test3 jmx from attachment. There should be 3 tests in Recent menu - test1, test2 and test3. Then do:

Delete recent_file_1 from registry
Restart JMeter
Click on file that is under 2nd line (3 underlined)

Actual:

Test is opened. However, there are 3 recent files but there should be two. File that is under 2nd line (3 underlined) is duplicated, as well in the registry. If clicked on 1st or 3rd line (3 underlined) in Open recent menu list, pop up error "Index: 8, Size: 8" is shown:

WARN o.a.j.g.a.Load: Unexpected error. java.lang.IndexOutOfBoundsException: Index: 8, Size: 8
java.lang.IndexOutOfBoundsException: Index: 8, Size: 8
at java.util.LinkedList.checkElementIndex(LinkedList.java:559) ~[?:?]
at java.util.LinkedList.get(LinkedList.java:480) ~[?:?]
at org.apache.jmeter.gui.action.LoadRecentProject.updateRecentFileMenuItems(LoadRecentProject.java:137) ~[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.gui.util.JMeterMenuBar.setProjectFileLoaded(JMeterMenuBar.java:145) ~[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.gui.MainFrame.setProjectFileLoaded(MainFrame.java:330) ~[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.gui.GuiPackage.setTestPlanFile(GuiPackage.java:732) ~[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:136) ~[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:101) ~[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.gui.action.LoadRecentProject.doActionAfterCheck(LoadRecentProject.java:66) ~[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.gui.action.AbstractActionWithNoRunningTest.doAction(AbstractActionWithNoRunningTest.java:44) ~[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:87) ~[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$0(ActionRouter.java:69) ~[ApacheJMeter_core.jar:5.3]
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:316) ~[?:?]
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770) ~[?:?]
at java.awt.EventQueue$4.run(EventQueue.java:721) ~[?:?]
at java.awt.EventQueue$4.run(EventQueue.java:715) ~[?:?]
at java.security.AccessController.doPrivileged(AccessController.java:391) [?:?]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) [?:?]
at java.awt.EventQueue.dispatchEvent(EventQueue.java:740) [?:?]
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) [?:?]
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) [?:?]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) [?:?]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) [?:?]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:?]
at java.awt.EventDispatchThread.run(EventDispatchThread.java:90) [?:?]

Check the images in the attachment.

Expected:

If recent_file_1 is deleted from registry and JMeter restarted, there should be two files, properly ordered (1, 2... etc.) as well in the registry. Both files can be opened.

--------------------------------

3. Open test1, test2 and test3 jmx from attachment. There should be 3 tests in Recent menu - test1, test2 and test3. Then do:

Rename, move or delete one of the test files.
Click on renamed, moved or deleted file.

Actual:

Pop up "C:\Users\NA\Desktop\test1.jmx (The system cannot find the file specified)" is shown.

Expected:

Pop up "C:\Users\NA\Desktop\test1.jmx (The system cannot find the file specified). Would you like to remove the file from the recent list?" is shown, Yes/No buttons are offered.

Jmeter 5.3
Microsoft Windows 10 Enterprise 64-bit
java version "14.0.1" 2020-04-14

There might be a lot of tests in Open Recent menu that cannot be found on destination, so there might be no reason that they should be on that list. In order to remove it from the list, the user must open the Registry Editor, browse the registry location and delete it.

Is there any other way to remove tests from Open recent list that is not by deleting it from the registry? If no, such an option from File menu is welcomed.

Created attachment [open recent.zip](https://apache.github.io/jmeter-bugzilla-attachments/32/65032/37651/open%20recent.zip): Open recent menu files

Version: Nightly
Severity: normal
OS: All

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.