Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Flaky testPositionalQueryParameters #2059

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -3438,7 +3438,12 @@ public void testPositionalQueryParameters() throws InterruptedException {
assertEquals(QUERY_RESULT_SCHEMA_BIGNUMERIC, result.getSchema());
assertEquals(2, Iterables.size(result.getValues()));
for (FieldValueList values : result.iterateAll()) {
assertEquals("1.40845209522E9", values.get(0).getValue());
// https://github.com/googleapis/java-bigquery/issues/2056. String comparison of values, eg
// 1.40845209522E9 vs 1408452095.22 seems to be failing, so comparing the values as epoc
// (Long) instead
assertEquals(
(long) Double.parseDouble("1.40845209522E9"),
(long) Double.parseDouble(values.get(0).getValue().toString()));
assertEquals("stringValue", values.get(1).getValue());
assertEquals(false, values.get(2).getBooleanValue());
assertEquals("0.33333333333333333333333333333333333333", values.get(3).getValue());
Expand Down