From 0045afac926c669b455e0e0129466196c1e75d26 Mon Sep 17 00:00:00 2001 From: Gil Mizrahi Date: Thu, 19 Oct 2023 12:18:07 +0300 Subject: [PATCH] Apply suggestions from code review --- crates/connectors/ndc-citus/tests/query_tests.rs | 2 ++ crates/connectors/ndc-cockroach/tests/query_tests.rs | 6 ++++++ crates/tests/other-db-tests/src/aurora/query_tests.rs | 2 ++ 3 files changed, 10 insertions(+) diff --git a/crates/connectors/ndc-citus/tests/query_tests.rs b/crates/connectors/ndc-citus/tests/query_tests.rs index 19e949f94..090efed60 100644 --- a/crates/connectors/ndc-citus/tests/query_tests.rs +++ b/crates/connectors/ndc-citus/tests/query_tests.rs @@ -254,6 +254,8 @@ mod sorting { insta::assert_json_snapshot!(result); } + // Citus sorts strings differently than PostgreSQL, + // so the 5th row might be different. #[tokio::test] async fn sorting_by_nested_relationship_column_with_predicate_exists() { let result = run_query( diff --git a/crates/connectors/ndc-cockroach/tests/query_tests.rs b/crates/connectors/ndc-cockroach/tests/query_tests.rs index b630e1f72..0c4f15bf4 100644 --- a/crates/connectors/ndc-cockroach/tests/query_tests.rs +++ b/crates/connectors/ndc-cockroach/tests/query_tests.rs @@ -245,6 +245,12 @@ mod sorting { insta::assert_json_snapshot!(result); } + // CockroachDB has the opposite default for nulls ordering than PostgreSQL, + // making the test I've written return random results + // (since most tracks are not by Accept, nulls are returned + // first, and we limit the number of results, + // we are not going to get the same result here), + // so we skip the two other sorting with predicate tests. #[tokio::test] async fn sorting_by_relationship_count_with_predicate() { let result = run_query( diff --git a/crates/tests/other-db-tests/src/aurora/query_tests.rs b/crates/tests/other-db-tests/src/aurora/query_tests.rs index a4d84abfa..f7a4887e0 100644 --- a/crates/tests/other-db-tests/src/aurora/query_tests.rs +++ b/crates/tests/other-db-tests/src/aurora/query_tests.rs @@ -255,6 +255,8 @@ mod sorting { insta::assert_json_snapshot!(result); } + // Aurora sorts strings differently than PostgreSQL, + // so the 5th row might be different. #[tokio::test] async fn sorting_by_nested_relationship_column_with_predicate_exists() { let result = run_query(