@@ -1682,10 +1682,11 @@ def test_group_by_column(
1682
1682
sdf = sdf .group_by (col )
1683
1683
sdf [col ] = col_update
1684
1684
1685
- groupby_topic = sdf .topics [0 ]
1686
1685
if num_partitions == 1 :
1686
+ groupby_topic = topic
1687
1687
assert sdf_registry .consumer_topics == [topic ]
1688
1688
else :
1689
+ groupby_topic = sdf .topics [0 ]
1689
1690
assert sdf_registry .consumer_topics == [topic , groupby_topic ]
1690
1691
assert groupby_topic .name .startswith ("repartition__" )
1691
1692
@@ -1702,7 +1703,7 @@ def test_group_by_column(
1702
1703
if num_partitions == 1 :
1703
1704
post_groupby_branch_result = pre_groupby_branch_result
1704
1705
else :
1705
- with internal_producer_factory (auto_offset_reset = "earliest" ) as consumer :
1706
+ with internal_consumer_factory (auto_offset_reset = "earliest" ) as consumer :
1706
1707
consumer .subscribe ([groupby_topic ])
1707
1708
consumed_row = consumer .poll_row (timeout = 5.0 )
1708
1709
@@ -1773,10 +1774,11 @@ def test_group_by_column_with_name(
1773
1774
sdf = sdf .group_by (col , name = op_name )
1774
1775
sdf [col ] = col_update
1775
1776
1776
- groupby_topic = sdf .topics [0 ]
1777
1777
if num_partitions == 1 :
1778
+ groupby_topic = topic
1778
1779
assert sdf_registry .consumer_topics == [topic ]
1779
1780
else :
1781
+ groupby_topic = sdf .topics [0 ]
1780
1782
assert sdf_registry .consumer_topics == [topic , groupby_topic ]
1781
1783
assert groupby_topic .name .startswith ("repartition__" )
1782
1784
@@ -1864,10 +1866,11 @@ def test_group_by_func(
1864
1866
sdf = sdf .group_by (lambda v : v [col ], name = op_name )
1865
1867
sdf [col ] = col_update
1866
1868
1867
- groupby_topic = sdf .topics [0 ]
1868
1869
if num_partitions == 1 :
1870
+ groupby_topic = topic
1869
1871
assert sdf_registry .consumer_topics == [topic ]
1870
1872
else :
1873
+ groupby_topic = sdf .topics [0 ]
1871
1874
assert sdf_registry .consumer_topics == [topic , groupby_topic ]
1872
1875
assert groupby_topic .name .startswith ("repartition__" )
1873
1876
0 commit comments