You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "David Capwell (Jira)" <ji...@apache.org> on 2021/11/16 19:24:00 UTC

[jira] [Commented] (CASSANDRA-17156) Fix test distributed.test.trackwarnings.TombstoneWarningTest

    [ https://issues.apache.org/jira/browse/CASSANDRA-17156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17444752#comment-17444752 ] 

David Capwell commented on CASSANDRA-17156:
-------------------------------------------

Looking at the first one I fixed this in the other tests but not tombstone:

Tombstone:

{code}
Assertions.assertThat(e.getFailuresMap())
                      .isEqualTo(ImmutableMap.of(
                      InetAddress.getByAddress(new byte[] {127, 0, 0, 1}), RequestFailureReason.READ_TOO_MANY_TOMBSTONES.code,
                      InetAddress.getByAddress(new byte[] {127, 0, 0, 2}), RequestFailureReason.READ_TOO_MANY_TOMBSTONES.code,
                      InetAddress.getByAddress(new byte[] {127, 0, 0, 3}), RequestFailureReason.READ_TOO_MANY_TOMBSTONES.code));
{code}

Others

{code}
ImmutableSet<InetAddress> expectedKeys = ImmutableSet.of(InetAddress.getByAddress(new byte[]{ 127, 0, 0, 1 }), InetAddress.getByAddress(new byte[]{ 127, 0, 0, 2 }), InetAddress.getByAddress(new byte[]{ 127, 0, 0, 3 }));
            assertThat(e.getFailuresMap())
            .hasSizeBetween(1, 3)
            // coordinator changes from run to run, so can't assert map as the key is dynamic... so assert the domain of keys and the single value expect
            .containsValue(RequestFailureReason.READ_SIZE.code)
            .hasKeySatisfying(new Condition<InetAddress>() {
                public boolean matches(InetAddress value)
                {
                    return expectedKeys.contains(value);
                }
            });
{code}

Looking at the second test now.

> Fix test distributed.test.trackwarnings.TombstoneWarningTest
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-17156
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17156
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Test/dtest/java
>            Reporter: David Capwell
>            Assignee: David Capwell
>            Priority: Normal
>             Fix For: NA
>
>
> https://app.circleci.com/pipelines/github/dcapwell/cassandra/1103/workflows/9a6767c7-fadf-4d86-9296-e8973167c6fe/jobs/7897
> Passed on jdk8 but failed on jdk11.
> Failures
> {code}
> junit.framework.AssertionFailedError: expected:<...7.0.0.1=1, /127.0.0.[2=1, /127.0.0.]3=1}> but was:<...7.0.0.1=1, /127.0.0.[]3=1}>
> 	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> 	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> 	at org.apache.cassandra.distributed.test.trackwarnings.TombstoneWarningTest.failThreshold(TombstoneWarningTest.java:233)
> 	at org.apache.cassandra.distributed.test.trackwarnings.TombstoneWarningTest.failThresholdScan(TombstoneWarningTest.java:189)
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> {code}
> and
> {code}
> junit.framework.AssertionFailedError: [global aborts] expected:<[2]L> but was:<[3]L>
> 	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> 	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> 	at org.apache.cassandra.distributed.test.trackwarnings.TombstoneWarningTest.assertWarnAborts(TombstoneWarningTest.java:294)
> 	at org.apache.cassandra.distributed.test.trackwarnings.TombstoneWarningTest.failThreshold(TombstoneWarningTest.java:219)
> 	at org.apache.cassandra.distributed.test.trackwarnings.TombstoneWarningTest.failThresholdSinglePartition(TombstoneWarningTest.java:183)
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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