Created
August 2, 2017 22:11
-
-
Save jsanda/e28cdab45c01554e6de7bcf2ef57def5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void findAllMetricIdentifiersShouldReturnDistinctResult() throws Exception { | |
String tenant = "DISTINCT"; | |
String metric = "METRIC"; | |
long timestamp = now().getMillis(); | |
String tempTable1 = dataAccess.getTempTableName(timestamp); | |
String tempTable2 = dataAccess.getTempTableName(now().minusHours(3).getMillis()); | |
session.execute("insert into " + tempTable1 + " (tenant_id, type, metric, time) values ('" + tenant + | |
"', 0, '" + metric + "', " + timestamp + ")"); | |
session.execute("insert into " + tempTable2 + " (tenant_id, type, metric, time) values ('" + tenant + | |
"', 0, '" + metric + "', " + timestamp + ")"); | |
Observable<Row> rows = dataAccess.findAllMetricIdentifiersInData(); | |
// This assertion fails | |
assertEquals(rows.toList().toBlocking().first().size(), 1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment