Repository navigation
Only test implementations from the plugin's own jar when asked - #1
Merged
Merged
Conversation
PluginLookup.lookupAll() narrows Lookup results to implementations loaded from the jar named by the gephi.plugins.tests.jar system property, which gephi-plugins' CI harness sets to the plugin under test. Otherwise implementations from the plugin's dependencies (e.g. core layout-plugin or statistics-plugin) were tested and their failures reported against the plugin. Without the property, every registered implementation is tested as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
The contract tests find the implementations they test with
Lookup.getDefault().lookupAll(...). When gephi-plugins' CI harness runs them against a plugin, Lookup also returns everything the plugin's dependencies register. A plugin that depends on corelayout-plugin(CircularLayout, ForceAtlas3D, GraphvizLayout, …) or onstatistics-plugin(LinkPrediction, PrestigePlugin, …) gets every core implementation tested under its name. That makes the run slower, and a core regression or a stricter test then fails that plugin's PR check.PluginLookup.lookupAll(Class). When thegephi.plugins.tests.jarsystem property is set to a jar file name, it returns only the implementations whose class was loaded from that jar, using the class'sCodeSource. When the property isn't set, it returns every registered implementation, as before. That keeps this repo's own self-test, which runs againstlayout-pluginfrom the test classpath, unchanged.LayoutContractTestuses it. New contract tests (e.g. statistics) should use it the same way.${plugin.artifactId}-${plugin.version}.jar. Version 1.0.0 ignores it, so filtering takes effect once the harness moves to a release that includes this change.Testing
mvn testwithout the property: 78 cases, same as before.-Dgephi.plugins.tests.jar=layout-plugin-0.11.4.jar: 78 cases, since every core layout lives in that jar.-Dgephi.plugins.tests.jar=nope.jar: 0 cases.Merging to
mastertriggersrelease.yml. The version is still1.0.1-SNAPSHOT, so that only attempts a snapshot deploy, which currently fails with HTTP 401 until SNAPSHOT publishing is enabled for theorg.gephinamespace. Cutting 1.1.0 is a separate version commit.🤖 Generated with Claude Code