Skip to content

Commit

Permalink
OF-2437: Introduce CachingPubsubPersistenceProviderTest
Browse files Browse the repository at this point in the history
This new unit test verifies behavior of CachingPubsubPersistenceProvider (which fails, as indicated by some of these test failing).

The tests introduced here only cover one (of three) types of operations that are being scheduled by the implementation:
- Node creation/changing/removal

These two other types of operation still need to be added:
- Affiliation creation/update/removal
- Subscription creation/update/removal
  • Loading branch information
guusdk committed Jan 22, 2025
1 parent 9ff9b79 commit ba7ad45
Show file tree
Hide file tree
Showing 2 changed files with 396 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package org.jivesoftware.openfire.pubsub;

import com.google.common.annotations.VisibleForTesting;
import org.jivesoftware.openfire.cluster.ClusterManager;
import org.jivesoftware.openfire.pep.PEPService;
import org.jivesoftware.openfire.pubsub.cluster.FlushTask;
Expand Down Expand Up @@ -82,7 +83,8 @@ public class CachingPubsubPersistenceProvider implements PubSubPersistenceProvid
*/
private final HashMap<PublishedItem.UniqueIdentifier, PublishedItem> itemsPending = new HashMap<>();

private ConcurrentMap<Node.UniqueIdentifier, List<NodeOperation>> nodesToProcess = new ConcurrentHashMap<>();
@VisibleForTesting
final ConcurrentMap<Node.UniqueIdentifier, List<NodeOperation>> nodesToProcess = new ConcurrentHashMap<>();

/**
* Cache name for recently accessed published items.
Expand Down
Loading

0 comments on commit ba7ad45

Please sign in to comment.