Build: #2699 was successful Manual run by daryl herzmann

Stages & jobs

  1. Build and Package

  2. Copy to Website

Build result summary

Details

Completed
Queue duration
1 second
Duration
8 minutes
Labels
None
Revision
b2914509228e99b722e7339a02bf0a5d10613e12
Total tests
1893
First to pass since
#2698 (Scheduled with changes by Guus der Kinderen and copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>)

Tests

Code commits

Author Commit Message Commit date
Guus der Kinderen Guus der Kinderen c3243f830b248d9d14b9eada175a63549080914f OF-3208: Fix plugin unload failure on Windows caused by JVM file locks
On Windows, the JVM holds mandatory file locks on JAR/class files opened by a plugin's class loader. These locks are not released until the underlying ZipFile/JarFile handles are garbage-collected, which prevented the extracted plugin directory from being deleted during unload. Because the cleanup of internal data structures (pluginsLoaded, childPluginMap, parentPluginMap) was sequenced after directory deletion, isLoaded() would incorrectly return true for plugins that had been unloaded, causing testDelete_Node_A and testReload_Node_A to fail on Windows CI.

Changes:
- Move pluginsLoaded/childPluginMap/parentPluginMap removal to immediately after doDestroyClassLoader, so that isLoaded() reflects logical state regardless of whether physical file deletion succeeds.
- Add System.runFinalization() alongside the existing System.gc() hints in doDestroyExtractedFiles to improve the likelihood of lock release between deletion attempts. Note: System.runFinalization() is deprecated since Java 18 and will need to be removed when support for it is dropped.
- Register all remaining files and directories with File.deleteOnExit() if the extracted plugin directory still exists after all retry attempts.
Guus der Kinderen Guus der Kinderen b2914509228e99b722e7339a02bf0a5d10613e12 OF-3211: Make plugin directory destruction timeout configurable
This commit introduces two properties, without changing its default values.

- `plugins.unloading.directory.destroy.delay` (2 seconds) - A delay that is observed between the time a plugin's unloading starts, and the plugin directory actually being removed.
- `plugins.unloading.directory.destroy.timeout` (40 seconds) - The maximum time that Openfire will wait for a plugin directory to be destroyed after the plugin is unloaded.

Instead of iterating 5 times up until the destroy timeout, the code now iterates more frequently. This should give faster response times in cases where the plugin directory destruction was successful only moments after the initial iteration failed.

Unit tests have been modified to reduce these values during their runtime. This is expected to reduce the runtime of tests.
Guus der Kinderen Guus der Kinderen 04c7179e0c16072b7eeeafb28cbd8dd8379db41c OF-3209: Introduce more reliable flag to signal plugin reload
Previously, a plugin was marked to be reloaded by having its 'last modified' date reset. This is an operation that's not guaranteed to be successful on all operating systems. In this commit, a more explicit flag is used.
Guus der Kinderen Guus der Kinderen f26db140d1942b853059a7b7946313ced57295af OF-3209: Fix plugin unload/reload failures on Windows caused by orphaned directories
On Windows, mandatory JVM file locks can prevent the extracted plugin directory from being deleted during unload. This causes two problems:

1. A deleted plugin whose JAR is gone may be reloaded from its orphaned directory. Fixed by filtering the directory stream to skip directories without a corresponding JAR/WAR file.
2. A reloaded plugin may be re-extracted from a stale directory if the previous directory deletion failed. Fixed by comparing JAR and directory modification times in unzipPlugin, forcing re-extraction when the JAR is newer than the existing directory.

Resolves test failures in PluginLoadingSimpleHierarchyTest and PluginLoadingComplexHierarchyTest on Windows.
Guus der Kinderen Guus der Kinderen 1dfffea56831d5711d6f77c7e13c32718e8890f9 OF-3209: More reliably test if plugin got reloaded
This modifies a unit test to no longer determine based on file attributes (last modified timestamp) if a plugin got (re)loaded. These attributes are not reliably set on all operating systems. The new approach registers an event listener instead.

Tests

Fixed tests 1
Status Test Failing since View job Duration
Successful LocalOutgoingServerSessionTest outgoingTest(ServerSettings, ServerSettings)[39]
Failing since build #2698 (Scheduled with changes by Guus der Kinderen and copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>) Debian Workflow < 1 sec

Jira issues

IssueDescriptionStatus
Unknown Issue TypeOF-3208Could not obtain issue details from Jira
Unknown Issue TypeOF-3209Could not obtain issue details from Jira
Unknown Issue TypeOF-3211Could not obtain issue details from Jira

Shared artifacts

Artifact File size
.deb files 56 MB