You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/06/28 17:39:30 UTC

[GitHub] [cassandra] maedhroz commented on a diff in pull request #1695: CASSANDRA-17695: Fix AbstractCell#toString for tombstoned multicell CollectionTypes

maedhroz commented on code in PR #1695:
URL: https://github.com/apache/cassandra/pull/1695#discussion_r908772861


##########
test/unit/org/apache/cassandra/db/CellTest.java:
##########
@@ -103,6 +105,26 @@ public void testConflictingTypeEquality()
         }
     }
 
+    @Test
+    public void testUnmarshallableInMulticellCollection()
+    {
+        List<CQL3Type.Native> unmarshallableTypes = new ArrayList<>();
+        for (CQL3Type.Native nativeType : CQL3Type.Native.values())
+        {
+            ColumnMetadata c = fakeColumn("c", MapType.getInstance(Int32Type.instance, nativeType.getType(), true));
+            BufferCell cell = BufferCell.tombstone(c, 0, 4, CellPath.create(ByteBufferUtil.bytes(4)));
+            try
+            {
+                Assert.assertEquals("expected #toString failed for type " + nativeType, "[c[4]=<tombstone> ts=0 ldt=4]", cell.toString());
+            }
+            catch (MarshalException m)
+            {
+                unmarshallableTypes.add(nativeType);
+            }
+        }
+        Assert.assertTrue(unmarshallableTypes.isEmpty());

Review Comment:
   nit: Might get a better error message with AssertJ
   
   ```
   assertThat(unmarshallableTypes).isEmpty();
   ```



-- 
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: pr-unsubscribe@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org