Conversation
… in JMeter 5.6.3. Bug 1: Inconsistent Test Plan Name After Merge. When the loaded file's root element is a `TestPlan`, `addSubTree` always resets the current plan's name to the incoming plan's name. Bug 2: Duplicate Menu Entries (Open, Merge, Save Selection As). `MenuFactory.addFileMenu()` is added to every node's popup, and that popup is mirrored into the Edit menu bar. Menu entries should be consistent and non‑duplicated. • File menu should contain file‑level actions. • Edit menu should contain node‑level actions. • Merge behavior should be predictable: either always preserve the current Test Plan name or always adopt the merged file’s name, regardless of selected node. Closes apache#6633
… in JMeter 5.6.3. Bug 1: Inconsistent Test Plan Name After Merge. When the loaded file's root element is a `TestPlan`, `addSubTree` always resets the current plan's name to the incoming plan's name. Bug 2: Duplicate Menu Entries (Open, Merge, Save Selection As). `MenuFactory.addFileMenu()` is added to every node's popup, and that popup is mirrored into the Edit menu bar. Menu entries should be consistent and non‑duplicated. • File menu should contain file‑level actions. • Edit menu should contain node‑level actions. • Merge behavior should be predictable: either always preserve the current Test Plan name or always adopt the merged file’s name, regardless of selected node. Closes apache#6633
…ted for gradle/actions/wrapper-validation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Both bugs from issue #6633 have been fixed across four files:
Bug 1 — Inconsistent Test Plan name after merge (3 files changed):
JMeterTreeModel.addSubTree()now has an overload that accepts amergingboolean. Whenmerging=true, theuserObject.setName(item.getName())call is skipped, so the current plan's name is always preserved regardless of which node was selected at the time of the merge.GuiPackage.addSubTree()gained a matchingaddSubTree(HashTree, boolean merging)overload that threads the flag down to the tree model.Load.insertLoadedTree()now callsguiInstance.addSubTree(tree, merging)instead of the no-arg form, so the flag flows end-to-end from the user action all the way to the model.Bug 2 — Duplicate Open / Merge / Save Selection As menu entries (1 file changed):
MenuFactory.addFileMenu()no longer addsOpen,Merge, orSave Selection Asitems to the node popup / Edit menu. Those three are file-level actions that already live in the File menu bar; having them in the right-click popup (which is mirrored into the Edit menu) was the sole source of the duplication. A comment was added explaining the intentional omission.Motivation and Context
Fixes #6633
There is inconsistent Test Plan naming and duplicate menu entries after merge:
How Has This Been Tested?
Two new test files were added:
src/core/…/gui/tree/JMeterTreeModelMergeTest.java— 3 pure unit tests (no GUI required):src/dist-check/…/gui/util/MenuFactoryFileMenuTest.java— 4 integration tests (placed indist-checkbecauseMenuFactory's static initializer requires the full JMeter classpath)Generated with Claude Sonnet via Cline
Types of changes
Checklist: