2424class DaprHealthCheckTests (unittest .TestCase ):
2525 @patch .object (settings , 'DAPR_HTTP_ENDPOINT' , 'http://domain.com:3500' )
2626 @patch ('urllib.request.urlopen' )
27- def test_wait_until_ready_success (self , mock_urlopen ):
27+ def test_wait_for_sidecar_success (self , mock_urlopen ):
2828 mock_urlopen .return_value .__enter__ .return_value = MagicMock (status = 200 )
2929
3030 try :
31- DaprHealth .wait_until_ready ()
31+ DaprHealth .wait_for_sidecar ()
3232 except Exception as e :
33- self .fail (f'wait_until_ready () raised an exception unexpectedly: { e } ' )
33+ self .fail (f'wait_for_sidecar () raised an exception unexpectedly: { e } ' )
3434
3535 mock_urlopen .assert_called_once ()
3636
@@ -45,13 +45,13 @@ def test_wait_until_ready_success(self, mock_urlopen):
4545 @patch .object (settings , 'DAPR_HTTP_ENDPOINT' , 'http://domain.com:3500' )
4646 @patch .object (settings , 'DAPR_API_TOKEN' , 'mytoken' )
4747 @patch ('urllib.request.urlopen' )
48- def test_wait_until_ready_success_with_api_token (self , mock_urlopen ):
48+ def test_wait_for_sidecar_success_with_api_token (self , mock_urlopen ):
4949 mock_urlopen .return_value .__enter__ .return_value = MagicMock (status = 200 )
5050
5151 try :
52- DaprHealth .wait_until_ready ()
52+ DaprHealth .wait_for_sidecar ()
5353 except Exception as e :
54- self .fail (f'wait_until_ready () raised an exception unexpectedly: { e } ' )
54+ self .fail (f'wait_for_sidecar () raised an exception unexpectedly: { e } ' )
5555
5656 mock_urlopen .assert_called_once ()
5757
@@ -64,13 +64,13 @@ def test_wait_until_ready_success_with_api_token(self, mock_urlopen):
6464
6565 @patch .object (settings , 'DAPR_HEALTH_TIMEOUT' , '2.5' )
6666 @patch ('urllib.request.urlopen' )
67- def test_wait_until_ready_timeout (self , mock_urlopen ):
67+ def test_wait_for_sidecar_timeout (self , mock_urlopen ):
6868 mock_urlopen .return_value .__enter__ .return_value = MagicMock (status = 500 )
6969
7070 start = time .time ()
7171
7272 with self .assertRaises (TimeoutError ):
73- DaprHealth .wait_until_ready ()
73+ DaprHealth .wait_for_sidecar ()
7474
7575 self .assertGreaterEqual (time .time () - start , 2.5 )
7676 self .assertGreater (mock_urlopen .call_count , 1 )
0 commit comments