Skip to content

Commit

Permalink
Improve config persistence manager test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
UdeshAthukorala committed Sep 29, 2024
1 parent 92d8083 commit 8140ce2
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@ public void testAddGlobalPolicyAlgorithm(String policyAlgorithmName) throws Exce
assertEquals(policyAlgorithmNameFromStorage, policyAlgorithmName);
}

@Test(dataProvider = "globalPolicyAlgorithmData")
public void testGetGlobalPolicyAlgorithmWhenCacheMisses(String policyAlgorithmName) throws Exception {

// Add the first global policy combining algorithm.
configPersistenceManager.addOrUpdateGlobalPolicyAlgorithm(policyAlgorithmName);
// Clear the cache.
ConfigCache.getInstance().clear(-1234);

String policyAlgorithmNameFromStorage = configPersistenceManager.getGlobalPolicyAlgorithmName();
assertEquals(policyAlgorithmNameFromStorage, policyAlgorithmName);
}

@Test(dataProvider = "globalPolicyAlgorithmData")
public void testUpdateGlobalPolicyAlgorithm(String policyAlgorithmName) throws Exception {

Expand Down

0 comments on commit 8140ce2

Please sign in to comment.