provisioning message cache should be cleared locally to help make unit tests more reliable

XMLWordPrintable

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Minor
    • 6.1.0, 4.22.1, 7.0.1
    • Affects Version/s: 7.0.1
    • Component/s: None
    • None

      1. GrouperProvisioningLogicIncremental.java — Added public static method to clear the message queue cache:
       {{public static void clearProvisioningMessageQueuesWithMessagesCache()

      { provisioningMessageQueuesWithMessages = null;}

      }}
       
      2. ProvisioningMessage.java — send() now automatically invalidates the cache after sending, so any same-JVM provisioner run will re-check the queue:
       GrouperProvisioningLogicIncremental.clearProvisioningMessageQueuesWithMessagesCache();
       
      3. SqlProvisionerTest.java — Added explicit cache clear before the second incrementalProvision() call (belt and suspenders with the send() fix), plus the import.

      With the send() fix, the explicit clear in the test is technically redundant now — but it's still good documentation of WHY the cache matters. The send() fix will also help any other tests that have USDU-then-incremental patterns.

            Assignee:
            Chris Hyzer
            Reporter:
            Chris Hyzer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: