sanpwc commented on code in PR #3931:
URL: https://github.com/apache/ignite-3/pull/3931#discussion_r1687862860
##########
modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/ItReplicaLifecycleTest.java:
##########
@@ -293,17 +293,33 @@ public void testEmptyReplicaListener() throws
NodeStoppingException {
createZone(node, "test_zone", 1, 1);
int zoneId = DistributionZonesTestUtil.getZoneId(node.catalogManager,
"test_zone", node.hybridClock.nowLong());
- createTable(node, "test_zone", "test_table");
- int tableId = TableTestUtils.getTableId(node.catalogManager,
"test_table", node.hybridClock.nowLong());
+ {
+ createTable(node, "test_zone", "test_table");
+ int tableId = TableTestUtils.getTableId(node.catalogManager,
"test_table", node.hybridClock.nowLong());
- node.converter.put(new TablePartitionId(tableId, 0), new
ZonePartitionId(zoneId, 0));
+ node.converter.put(new TablePartitionId(tableId, 0), new
ZonePartitionId(zoneId, 0));
- KeyValueView<Long, Integer> keyValueView =
node.tableManager.table(tableId).keyValueView(Long.class, Integer.class);
+ KeyValueView<Long, Integer> keyValueView =
node.tableManager.table(tableId).keyValueView(Long.class, Integer.class);
- assertDoesNotThrow(() -> keyValueView.put(null, 1L, 1));
+ assertDoesNotThrow(() -> keyValueView.put(null, 1L, 100));
- // Actually we are testing not the fair put value, but the hardcoded
one from temporary noop replica listener
- assertEquals(-1, keyValueView.get(null, 1L));
+ // Actually we are testing not the fair put value, but the
hardcoded one from temporary noop replica listener
+ assertEquals(100, keyValueView.get(null, 1L));
+ }
+
+ {
+ createTable(node, "test_zone", "test_table1");
+ int tableId = TableTestUtils.getTableId(node.catalogManager,
"test_table1", node.hybridClock.nowLong());
+
+ node.converter.put(new TablePartitionId(tableId, 0), new
ZonePartitionId(zoneId, 0));
+
+ KeyValueView<Long, Integer> keyValueView =
node.tableManager.table(tableId).keyValueView(Long.class, Integer.class);
+
+ assertDoesNotThrow(() -> keyValueView.put(null, 1L, 200));
+
+ // Actually we are testing not the fair put value, but the
hardcoded one from temporary noop replica listener
Review Comment:
Up to you.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]