66@pytest .mark .asyncio
77class TestTopicWriterAsyncIO :
88 async def test_send_message (self , driver : ydb .aio .Driver , topic_path ):
9- writer = driver .topic_client .topic_writer (
9+ writer = driver .topic_client .writer (
1010 topic_path , producer_and_message_group_id = "test"
1111 )
1212 await writer .write (ydb .TopicWriterMessage (data = "123" .encode ()))
1313 await writer .close ()
1414
1515 async def test_wait_last_seqno (self , driver : ydb .aio .Driver , topic_path ):
16- async with driver .topic_client .topic_writer (
16+ async with driver .topic_client .writer (
1717 topic_path ,
1818 producer_and_message_group_id = "test" ,
1919 auto_seqno = False ,
@@ -22,7 +22,7 @@ async def test_wait_last_seqno(self, driver: ydb.aio.Driver, topic_path):
2222 ydb .TopicWriterMessage (data = "123" .encode (), seqno = 5 )
2323 )
2424
25- async with driver .topic_client .topic_writer (
25+ async with driver .topic_client .writer (
2626 topic_path ,
2727 producer_and_message_group_id = "test" ,
2828 get_last_seqno = True ,
@@ -31,7 +31,7 @@ async def test_wait_last_seqno(self, driver: ydb.aio.Driver, topic_path):
3131 assert init_info .last_seqno == 5
3232
3333 async def test_auto_flush_on_close (self , driver : ydb .aio .Driver , topic_path ):
34- async with driver .topic_client .topic_writer (
34+ async with driver .topic_client .writer (
3535 topic_path ,
3636 producer_and_message_group_id = "test" ,
3737 auto_seqno = False ,
@@ -43,7 +43,7 @@ async def test_auto_flush_on_close(self, driver: ydb.aio.Driver, topic_path):
4343 ydb .TopicWriterMessage (data = f"msg-{ i } " , seqno = last_seqno )
4444 )
4545
46- async with driver .topic_client .topic_writer (
46+ async with driver .topic_client .writer (
4747 topic_path ,
4848 producer_and_message_group_id = "test" ,
4949 get_last_seqno = True ,
@@ -54,21 +54,21 @@ async def test_auto_flush_on_close(self, driver: ydb.aio.Driver, topic_path):
5454
5555class TestTopicWriterSync :
5656 def test_send_message (self , driver_sync : ydb .Driver , topic_path ):
57- writer = driver_sync .topic_client .topic_writer (
57+ writer = driver_sync .topic_client .writer (
5858 topic_path , producer_and_message_group_id = "test"
5959 )
6060 writer .write (ydb .TopicWriterMessage (data = "123" .encode ()))
6161 writer .close ()
6262
6363 def test_wait_last_seqno (self , driver_sync : ydb .Driver , topic_path ):
64- with driver_sync .topic_client .topic_writer (
64+ with driver_sync .topic_client .writer (
6565 topic_path ,
6666 producer_and_message_group_id = "test" ,
6767 auto_seqno = False ,
6868 ) as writer :
6969 writer .write_with_ack (ydb .TopicWriterMessage (data = "123" .encode (), seqno = 5 ))
7070
71- with driver_sync .topic_client .topic_writer (
71+ with driver_sync .topic_client .writer (
7272 topic_path ,
7373 producer_and_message_group_id = "test" ,
7474 get_last_seqno = True ,
@@ -77,7 +77,7 @@ def test_wait_last_seqno(self, driver_sync: ydb.Driver, topic_path):
7777 assert init_info .last_seqno == 5
7878
7979 def test_auto_flush_on_close (self , driver_sync : ydb .Driver , topic_path ):
80- with driver_sync .topic_client .topic_writer (
80+ with driver_sync .topic_client .writer (
8181 topic_path ,
8282 producer_and_message_group_id = "test" ,
8383 auto_seqno = False ,
@@ -87,7 +87,7 @@ def test_auto_flush_on_close(self, driver_sync: ydb.Driver, topic_path):
8787 last_seqno = i + 1
8888 writer .write (ydb .TopicWriterMessage (data = f"msg-{ i } " , seqno = last_seqno ))
8989
90- with driver_sync .topic_client .topic_writer (
90+ with driver_sync .topic_client .writer (
9191 topic_path ,
9292 producer_and_message_group_id = "test" ,
9393 get_last_seqno = True ,
0 commit comments