Also, sometimes fragile tests are sensitive to the order in which they are
run.  If it passes on CI but not locally that may be what's going on.  You
can try running just the failed class (easy in ant) or test (hard in ant,
easy in intellij/eclipse) in isolation and see if that makes a difference.

On Thu, May 19, 2016 at 9:24 AM, Oleksandr Petrov <
oleksandr.pet...@gmail.com> wrote:

> It passes for me, and seems to work on the CI.
> Rule of thumb for me personally is:
>   * make sure that everything cleaned up (no c* instances running, no tests
> running at same time)
>   * make sure the latest version is pulled
>   * in case something failed, try running more than once
>
> If it constantly fails, fire up the issue.
> If it failed just that one time, forget about it for now, it'll pop up
> again, so you'll think of it then.
> If it fails every other time, fire up the issue and explain that it doesn't
> fail all the time.
>
>
> On Thu, May 19, 2016 at 11:43 AM Mahdi Mohammadi <mah...@gmail.com> wrote:
>
> > I ran your command and test is successful but still there are tests which
> > are failing and I am confused.
> > My Java version is 1.8.0_74 and OS is 64 bit Debian (Vagrant box).
> >
> > When I run: *ant clean && ant test -Dtest.name=CassandraIndexTest *(both
> on
> > trunk and cassandra-3.0), I get error:
> >
> >    * [junit] INFO  09:40:24 Initializing
> > cql_test_keyspace.table_24.table_24_c_idx*
> > *    [junit] INFO  09:40:24 Drop Keyspace 'cql_test_keyspace_alt'*
> > *    [junit] ------------- ---------------- ---------------*
> > *    [junit] Testcase:
> >
> >
> indexOnRegularColumn(org.apache.cassandra.index.internal.CassandraIndexTest):
> >     FAILED*
> > *    [junit] Got less rows than expected. Expected 1 but got 0*
> > *    [junit] junit.framework.AssertionFailedError: Got less rows than
> > expected. Expected 1 but got 0*
> > *    [junit]     at
> > org.apache.cassandra.cql3.CQLTester.assertRows(CQLTester.java:818)*
> > *    [junit]     at
> >
> >
> org.apache.cassandra.index.internal.CassandraIndexTest$TestScript.run(CassandraIndexTest.java:660)*
> > *    [junit]     at
> >
> >
> org.apache.cassandra.index.internal.CassandraIndexTest.indexOnRegularColumn(CassandraIndexTest.java:70)*
> > *    [junit]*
> > *    [junit]*
> > *    [junit] Testcase:
> >
> >
> indexOnNonFrozenListWithReplaceOperation(org.apache.cassandra.index.internal.CassandraIndexTest):
> > FAILED*
> > *    [junit] Got less rows than expected. Expected 1 but got 0*
> > *    [junit] junit.framework.AssertionFailedError: Got less rows than
> > expected. Expected 1 but got 0*
> > *    [junit]     at
> > org.apache.cassandra.cql3.CQLTester.assertRows(CQLTester.java:818)*
> > *    [junit]     at
> >
> >
> org.apache.cassandra.index.internal.CassandraIndexTest$TestScript.run(CassandraIndexTest.java:660)*
> > *    [junit]     at
> >
> >
> org.apache.cassandra.index.internal.CassandraIndexTest.indexOnNonFrozenListWithReplaceOperation(CassandraIndexTest.java:148)*
> > *    [junit]*
> > *    [junit]*
> > *    [junit] Testcase:
> >
> >
> indexOnNonFrozenMapValuesWithReplaceOperation(org.apache.cassandra.index.internal.CassandraIndexTest):
> >    FAILED*
> > *    [junit] Got less rows than expected. Expected 1 but got 0*
> > *    [junit] junit.framework.AssertionFailedError: Got less rows than
> > expected. Expected 1 but got 0*
> > *    [junit]     at
> > org.apache.cassandra.cql3.CQLTester.assertRows(CQLTester.java:818)*
> > *    [junit]     at
> >
> >
> org.apache.cassandra.index.internal.CassandraIndexTest$TestScript.run(CassandraIndexTest.java:627)*
> > *    [junit]     at
> >
> >
> org.apache.cassandra.index.internal.CassandraIndexTest.indexOnNonFrozenMapValuesWithReplaceOperation(CassandraIndexTest.java:212)*
> > *    [junit]*
> > *    [junit]*
> > *    [junit] Test org.apache.cassandra.index.internal.CassandraIndexTest
> > FAILED*
> >
> >
> >
> >
> > Best Regards
> >
> > On Thu, May 19, 2016 at 3:21 PM, Oleksandr Petrov <
> > oleksandr.pet...@gmail.com> wrote:
> >
> > > I just tried it locally, `ant clean && ant test
> > > -Dtest.name=TopKSamplerTest` works just fine (tried the other test,
> too).
> > > What's your JDK version? I can't see anything obvious that is wrong. If
> > the
> > > branch is up-to-date, it usually has to build.
> > >
> > >
> > > On Thu, May 19, 2016 at 5:12 AM Mahdi Mohammadi <mah...@gmail.com>
> > wrote:
> > >
> > > > I am trying to run `ant test` on cassandra-3.0 branch but get some
> > > errors:
> > > >
> > > > *    [junit] Testcase:
> > > >
> > > >
> > >
> >
> testSamplerSingleInsertionsEqualMulti(org.apache.cassandra.utils.TopKSamplerTest):
> > > >    FAILED*
> > > > *    [junit] expected:<{item2=2, item1=1, item8=8, item7=7, item9=9,
> > > > item4=4, item10=10, item3=3, item6=6, item5=5}> but was:<{item2=2,
> > > item1=1,
> > > > item8=8, item7=7, item9=9, item4=4, item3=3, item6=6,*
> > > > *item5=5}>*
> > > > *    [junit] junit.framework.AssertionFailedError:
> expected:<{item2=2,
> > > > item1=1, item8=8, item7=7, item9=9, item4=4, item10=10, item3=3,
> > item6=6,
> > > > item5=5}> but was:<{item2=2, item1=1, item8=8, item7=7,*
> > > > *item9=9, item4=4, item3=3, item6=6, item5=5}>*
> > > > *    [junit]     at
> > > >
> > > >
> > >
> >
> org.apache.cassandra.utils.TopKSamplerTest.testSamplerSingleInsertionsEqualMulti(TopKSamplerTest.java:39)*
> > > > *    [junit]*
> > > >
> > > > Or this one:
> > > >
> > > > *    [junit] Testcase:
> > > >
> > executeTriggerOnThriftInsert(org.apache.cassandra.triggers.TriggersTest):
> > > > Caused an ERROR*
> > > > *    [junit] Trigger trigger_1 already exists*
> > > > *    [junit] org.apache.cassandra.exceptions.InvalidRequestException:
> > > > Trigger trigger_1 already exists*
> > > > *    [junit]     at
> > > >
> > > >
> > >
> >
> org.apache.cassandra.cql3.statements.CreateTriggerStatement.announceMigration(CreateTriggerStatement.java:85)*
> > > > *    [junit]     at
> > > >
> > > >
> > >
> >
> org.apache.cassandra.cql3.statements.SchemaAlteringStatement.execute(SchemaAlteringStatement.java:93)*
> > > > *    [junit]     at
> > > >
> > > >
> > >
> >
> org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:206)*
> > > > *    [junit]     at
> > > >
> > >
> >
> org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:237)*
> > > > *    [junit]     at
> > > >
> > >
> >
> org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:252)*
> > > > *    [junit]     at
> > > >
> > >
> >
> org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:247)*
> > > > *    [junit]     at
> > > >
> org.apache.cassandra.triggers.TriggersTest.setup(TriggersTest.java:92)*
> > > > *    [junit]*
> > > > *    [junit]*
> > > >
> > > > Am I missing something?
> > > >
> > > > Best Regards
> > > >
> > > --
> > > Alex Petrov
> > >
> >
> --
> Alex Petrov
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder, http://www.datastax.com
@spyced

Reply via email to