@@ -783,18 +783,15 @@ TEST(Shuffler, SpillOnInsertAndExtraction) {
783783/* *
784784 * @brief A test util that runs the wait test by first calling wait_fn lambda with no
785785 * partitions finished, and then with one partition finished. Former case, should timeout,
786- * while the latter should pass. Since each wait function (wait, wait_on) has different
787- * output types, extract_pid_fn lambda is used to extract the pid from the output.
786+ * while the latter should pass.
788787 *
789788 * @tparam WaitFn a lambda that takes FinishCounter and PartID as arguments and returns
790- * the result of the wait function.* @tparam ExctractPidFn a lambda that takes the result
791- * of WaitFn and returns the PID extracted from the result.
789+ * the result of the wait function.
792790 *
793791 * @param wait_fn wait lambda
794- * @param extract_pid_fn extract partition ID lambda
795792 */
796- template <typename WaitFn, typename ExctractPidFn >
797- void run_wait_test (WaitFn&& wait_fn, ExctractPidFn&& extract_pid_fn ) {
793+ template <typename WaitFn>
794+ void run_wait_test (WaitFn&& wait_fn) {
798795 rapidsmpf::shuffler::PartID out_nparts = 20 ;
799796 auto comm = GlobalEnvironment->comm_ ;
800797
@@ -834,28 +831,26 @@ void run_wait_test(WaitFn&& wait_fn, ExctractPidFn&& extract_pid_fn) {
834831 }
835832
836833 // pass the wait_fn result to extract_pid_fn. It should return p_id
837- EXPECT_EQ (p_id, extract_pid_fn ( wait_fn (finish_counter, p_id) ));
834+ EXPECT_EQ (p_id, wait_fn (finish_counter, p_id));
838835}
839836
840837TEST (FinishCounterTests, wait_with_timeout) {
841- ASSERT_NO_FATAL_FAILURE (run_wait_test (
842- [](rapidsmpf::shuffler::detail::FinishCounter& finish_counter,
843- rapidsmpf::shuffler::PartID const & /* exp_pid */ ) {
838+ ASSERT_NO_FATAL_FAILURE (
839+ run_wait_test ( [](rapidsmpf::shuffler::detail::FinishCounter& finish_counter,
840+ rapidsmpf::shuffler::PartID const & /* exp_pid */ ) {
844841 return finish_counter.wait_any (std::chrono::milliseconds (10 ));
845- },
846- std::identity{}
847- ));
842+ })
843+ );
848844}
849845
850846TEST (FinishCounterTests, wait_on_with_timeout) {
851- ASSERT_NO_FATAL_FAILURE (run_wait_test (
852- [&](rapidsmpf::shuffler::detail::FinishCounter& finish_counter,
853- rapidsmpf::shuffler::PartID const & exp_pid) {
847+ ASSERT_NO_FATAL_FAILURE (
848+ run_wait_test ( [&](rapidsmpf::shuffler::detail::FinishCounter& finish_counter,
849+ rapidsmpf::shuffler::PartID const & exp_pid) {
854850 finish_counter.wait_on (exp_pid, std::chrono::milliseconds (10 ));
855851 return exp_pid; // return expected PID as wait_on return void
856- },
857- std::identity{}
858- ));
852+ })
853+ );
859854}
860855
861856class FinishCounterMultithreadingTest
0 commit comments