alamb commented on code in PR #7439:
URL: https://github.com/apache/arrow-datafusion/pull/7439#discussion_r1308669151


##########
datafusion/core/tests/fuzz_cases/sort_fuzz.rs:
##########
@@ -36,28 +36,112 @@ use test_utils::{batches_to_vec, partitions_to_sorted_vec};
 #[tokio::test]
 #[cfg_attr(tarpaulin, ignore)]
 async fn test_sort_1k_mem() {
-    run_sort(10240, vec![(5, false), (20000, true), (1000000, true)]).await
+    SortTest::new()
+        .with_int32_batches(5)
+        .with_pool_size(10240)
+        .with_should_spill(false)
+        .run()
+        .await;
+
+    SortTest::new()
+        .with_int32_batches(20000)
+        .with_pool_size(10240)
+        .with_should_spill(true)
+        .run()
+        .await;
+
+    SortTest::new()
+        .with_int32_batches(1000000)
+        .with_pool_size(10240)
+        .with_should_spill(true)
+        .run()
+        .await;
 }
 
 #[tokio::test]
 #[cfg_attr(tarpaulin, ignore)]
 async fn test_sort_100k_mem() {
-    run_sort(102400, vec![(5, false), (20000, false), (1000000, true)]).await
+    SortTest::new()
+        .with_int32_batches(5)
+        .with_pool_size(102400)
+        .with_should_spill(false)
+        .run()
+        .await;
+
+    SortTest::new()
+        .with_int32_batches(20000)
+        .with_pool_size(102400)
+        .with_should_spill(false)
+        .run()
+        .await;
+
+    SortTest::new()
+        .with_int32_batches(1000000)
+        .with_pool_size(102400)
+        .with_should_spill(true)
+        .run()
+        .await;
 }
 
 #[tokio::test]
 async fn test_sort_unlimited_mem() {
-    run_sort(
-        usize::MAX,
-        vec![(5, false), (2000, false), (1000000, false)],
-    )
-    .await
+    SortTest::new()
+        .with_int32_batches(5)

Review Comment:
   the idea here is simply to make the test parameters explicit and easier to 
read



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to