[
https://issues.apache.org/jira/browse/CASSANDRA-10034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14682401#comment-14682401
]
Paulo Motta commented on CASSANDRA-10034:
-----------------------------------------
Wasn't able to reproduce the intermittency locally. My guess is that sometimes
{{toUnixTimestamp(now())}} is mapping to the same millisecond in the first and
second statements, so in the second statement {{b < toUnixTimestamp(now())}}
sometimes returns 0 entries:
{noformat}
INSERT INTO %s (a, b, c, d) VALUES (0, toUnixTimestamp(now()),
toTimestamp(now()), toTimestamp(now()))
SELECT * FROM %s WHERE a=0 AND b < toUnixTimestamp(now())
{noformat}
So I basically replaced {{b < toUnixTimestamp(now())}} in the second statement
by {{b <= toUnixTimestamp(now())}}, to guarantee at least one entry will be
returned in case {{toUnixTimestamp(now())}} maps to the same millisecond.
* [3.0 patch|https://github.com/pauloricardomg/cassandra/tree/10034-3.0]
* [3.0
testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-10034-3.0-testall/]
(not ready yet)
* [trunk patch|https://github.com/pauloricardomg/cassandra/tree/10034-trunk]
* [trunk
testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-10034-trunk-testall/]
(not ready yet)
> Windows utest 3.0: testDateCompatibility failing intermittently
> ---------------------------------------------------------------
>
> Key: CASSANDRA-10034
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10034
> Project: Cassandra
> Issue Type: Sub-task
> Reporter: Joshua McKenzie
> Assignee: Paulo Motta
> Labels: Windows
> Fix For: 3.0.0 rc1
>
>
> 2/5 fail on Windows, 0/5 fail on Linux, I'm calling it WIndows-only:
> {noformat}
> [junit] Testcase:
> testDateCompatibility(org.apache.cassandra.cql3.validation.entities.TypeTest):
> FAILED
> [junit] expected:<1> but was:<0>
> [junit] junit.framework.AssertionFailedError: expected:<1> but was:<0>
> [junit] at
> org.apache.cassandra.cql3.validation.entities.TypeTest.testDateCompatibility(TypeTest.java:49)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)