[ https://issues.apache.org/jira/browse/CASSANDRA-14106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16288419#comment-16288419 ]
Jay Zhuang edited comment on CASSANDRA-14106 at 12/12/17 11:32 PM: ------------------------------------------------------------------- Hi [~bdeggleston], after changing the {{double d}} to {{float d}}, it won't break stress. In the patch, I also added an unittest to reproduce the issue introduced by {{lgmt.com}} change. The problem with {{double}} is: in the last round, the value of {{d}} would be {{1.0000...004}} instead of {{1.0}}. Which causes the exception {{OutOfRangeException: 1 out of [0, 1] range}} in cassandra-stress gaussian distribution. was (Author: jay.zhuang): Hi [~bdeggleston], after changing the {{double d}} to {{float d}}, it won't break stress. In the patch, I also added an unittest to reproduce the issue introduced by {{lgmt.com}} change. > utest failed: DistributionSequenceTest.setSeed() and simpleSequence() > --------------------------------------------------------------------- > > Key: CASSANDRA-14106 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14106 > Project: Cassandra > Issue Type: Bug > Components: Testing > Reporter: Jay Zhuang > Assignee: Jay Zhuang > > To reproduce: > {noformat} > $ ant stress-test -Dtest.name=DistributionSequenceTest > {noformat} > {noformat} > stress-test: > [junit] Testsuite: > org.apache.cassandra.stress.generate.DistributionSequenceTest > [junit] Testsuite: > org.apache.cassandra.stress.generate.DistributionSequenceTest Tests run: 4, > Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.08 sec > [junit] > [junit] Testcase: > simpleSequence(org.apache.cassandra.stress.generate.DistributionSequenceTest): > FAILED > [junit] expected:<5> but was:<4> > [junit] junit.framework.AssertionFailedError: expected:<5> but was:<4> > [junit] at > org.apache.cassandra.stress.generate.DistributionSequenceTest.simpleSequence(DistributionSequenceTest.java:37) > [junit] > [junit] > [junit] Testcase: > setSeed(org.apache.cassandra.stress.generate.DistributionSequenceTest): > FAILED > [junit] expected:<5> but was:<4> > [junit] junit.framework.AssertionFailedError: expected:<5> but was:<4> > [junit] at > org.apache.cassandra.stress.generate.DistributionSequenceTest.setSeed(DistributionSequenceTest.java:111) > [junit] > [junit] > [junit] Test > org.apache.cassandra.stress.generate.DistributionSequenceTest FAILED > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org