dakirily commented on code in PR #239:
URL: https://github.com/apache/qpid-broker-j/pull/239#discussion_r1478477230


##########
broker-core/src/test/java/org/apache/qpid/server/store/BrokerStoreUpgraderAndRecovererTest.java:
##########
@@ -898,10 +897,75 @@ public void 
testContextVariableUpgradeFromBoneCPToHikariCPProvider(final String
         context.put("qpid.jdbcstore.bonecp.partitionCount", partitionCount);
         context.put("qpid.jdbcstore.bonecp.maxConnectionsPerPartition", 
maxConnectionsPerPartition);
         context.put("qpid.jdbcstore.bonecp.minConnectionsPerPartition", 
minConnectionsPerPartition);
+        context.put("qpid.jdbcstore.property1", "1");
+        context.put("qpid.jdbcstore.property2", "two");
+        context.put("qpid.jdbcstore.property3", "_3_");
+
         final Map<String, Object> attributes = Map.of("name", getTestName(),
                 "type", "JDBC",
                 "connectionPoolType", "BONECP",
                 "context", context);
+
+        _brokerRecord.getAttributes().put("context", context);
+
+        final ConfiguredObjectRecord systemConfigRecord = 
mock(ConfiguredObjectRecord.class);;
+        when(systemConfigRecord.getId()).thenReturn(randomUUID());
+        when(systemConfigRecord.getType()).thenReturn("SystemConfig");
+        
when(systemConfigRecord.getAttributes()).thenReturn(Map.copyOf(attributes));

Review Comment:
   The test was fixed to use a copy of a context map for each object.



##########
broker-core/src/test/java/org/apache/qpid/server/store/VirtualHostStoreUpgraderAndRecovererTest.java:
##########
@@ -323,29 +323,36 @@ public void 
testContextVariableUpgradeFromBoneCPToHikariCPProvider(final String
         context.put("qpid.jdbcstore.bonecp.partitionCount", partitionCount);
         context.put("qpid.jdbcstore.bonecp.maxConnectionsPerPartition", 
maxConnectionsPerPartition);
         context.put("qpid.jdbcstore.bonecp.minConnectionsPerPartition", 
minConnectionsPerPartition);
+
         final Map<String, Object> attributes = Map.of("name", getTestName(),
                 "modelVersion", "9.0",
                 "type", "JDBC",
                 "connectionPoolType", "BONECP",
                 "context", context);
+
         final ConfiguredObjectRecord virtualHostRecord = 
mock(ConfiguredObjectRecord.class);;
         when(virtualHostRecord.getId()).thenReturn(randomUUID());
         when(virtualHostRecord.getType()).thenReturn("VirtualHost");
         when(virtualHostRecord.getAttributes()).thenReturn(attributes);
 
-        final List<ConfiguredObjectRecord> records = List.of(rootRecord, 
virtualHostRecord);
+        final ConfiguredObjectRecord virtualHostLoggerRecord = 
mock(ConfiguredObjectRecord.class);;
+        when(virtualHostLoggerRecord.getId()).thenReturn(randomUUID());
+        
when(virtualHostLoggerRecord.getType()).thenReturn("VirtualHostLogger");
+        when(virtualHostLoggerRecord.getAttributes()).thenReturn(attributes);

Review Comment:
   The test was fixed in the same way as in BrokerStoreUpgraderAndRecovererTest 
to keep to uniformity.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to