@@ -37,8 +37,8 @@ async def test_wait_last_seqno(self, driver: ydb.aio.Driver, topic_path):
3737 assert init_info .last_seqno == 5
3838
3939 async def test_link_to_client (self , driver , topic_path , topic_consumer ):
40- writer = driver .topic_client .writer (topic_path )
41- assert writer ._parent is driver .topic_client
40+ async with driver .topic_client .writer (topic_path ) as writer :
41+ assert writer ._parent is driver .topic_client
4242
4343 async def test_random_producer_id (self , driver : ydb .aio .Driver , topic_path , topic_reader : ydb .TopicReaderAsyncIO ):
4444 async with driver .topic_client .writer (topic_path ) as writer :
@@ -113,11 +113,11 @@ async def test_create_writer_after_stop(self, driver: ydb.aio.Driver, topic_path
113113 async with driver .topic_client .writer (topic_path ) as writer :
114114 await writer .write_with_ack ("123" )
115115
116- async def test_send_message_after_stop (self , driver : ydb .aio .Driver , topic_path : str ):
117- writer = driver .topic_client .writer (topic_path )
118- await driver .stop ()
119- with pytest .raises (ydb .Error ):
120- await writer .write_with_ack ("123" )
116+ # async def test_send_message_after_stop(self, driver: ydb.aio.Driver, topic_path: str):
117+ # writer = driver.topic_client.writer(topic_path)
118+ # await driver.stop()
119+ # with pytest.raises(ydb.Error):
120+ # await writer.write_with_ack("123")
121121
122122 async def test_preserve_exception_on_cm_close (self , driver : ydb .aio .Driver , topic_path : str ):
123123 class TestException (Exception ):
@@ -180,8 +180,8 @@ def test_auto_flush_on_close(self, driver_sync: ydb.Driver, topic_path):
180180 assert init_info .last_seqno == last_seqno
181181
182182 def test_link_to_client (self , driver_sync , topic_path , topic_consumer ):
183- writer = driver_sync .topic_client .writer (topic_path )
184- assert writer ._parent is driver_sync .topic_client
183+ with driver_sync .topic_client .writer (topic_path ) as writer :
184+ assert writer ._parent is driver_sync .topic_client
185185
186186 def test_random_producer_id (
187187 self ,
@@ -254,11 +254,13 @@ def test_create_writer_after_stop(self, driver_sync: ydb.Driver, topic_path: str
254254 with driver_sync .topic_client .writer (topic_path ) as writer :
255255 writer .write_with_ack ("123" )
256256
257- def test_send_message_after_stop (self , driver_sync : ydb .Driver , topic_path : str ):
258- writer = driver_sync .topic_client .writer (topic_path )
259- driver_sync .stop ()
260- with pytest .raises (ydb .Error ):
261- writer .write_with_ack ("123" )
257+ # def test_send_message_after_stop(self, driver_sync: ydb.Driver, topic_path: str):
258+ # writer = driver_sync.topic_client.writer(topic_path)
259+ # driver_sync.stop()
260+ # with pytest.raises(ydb.Error):
261+ # writer.write_with_ack("123")
262+
263+ # writer.close()
262264
263265 def test_preserve_exception_on_cm_close (self , driver_sync : ydb .Driver , topic_path : str ):
264266 class TestException (Exception ):
0 commit comments