cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aweisberg <...@git.apache.org>
Subject [GitHub] cassandra pull request #228: Add option to sanity check tombstones on reads/...
Date Thu, 31 May 2018 15:23:46 GMT
Github user aweisberg commented on a diff in the pull request:

    https://github.com/apache/cassandra/pull/228#discussion_r192138455
  
    --- Diff: test/unit/org/apache/cassandra/db/compaction/CompactionsCQLTest.java ---
    @@ -425,11 +441,21 @@ private void readAndValidate(boolean asc) throws Throwable
             }
             catch (Throwable t)
             {
    -            assertTrue(t instanceof MarshalException);
    -            assertTrue(t.getMessage().contains("Key 22"));
    +            assertTrue(t instanceof CorruptSSTableException);
                 gotException = true;
    +            Throwable cause = t;
    +            while (cause != null && !(cause instanceof MarshalException))
    +                cause = cause.getCause();
    +            assertNotNull(cause);
    +            MarshalException me = (MarshalException) cause;
    +            assertTrue(me.getMessage().contains("Key 22"));
             }
             assertTrue(gotException);
    +        for (SSTableReader sstable : getCurrentColumnFamilyStore().getLiveSSTables())
    +        {
    +            assertTrue(sstable.isMarkedSuspect());
    +            sstable.unmarkSuspect();
    +        }
    --- End diff --
    
    All of these things are copy pasted three different tests. Could be a little more DRY
but it's not a big deal.


---

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


Mime
View raw message