@@ -68,16 +68,16 @@ def tearDownClass(cls):
6868 def _check_existing_server ():
6969 """Check if OptILLM server is already running"""
7070 try :
71- response = requests .get ("http://localhost:8000/v1/ health" , timeout = 2 )
71+ response = requests .get ("http://localhost:8000/health" , timeout = 2 )
7272 return response .status_code == 200
7373 except requests .exceptions .RequestException :
7474 return False
75-
75+
7676 @staticmethod
7777 def _check_server_health ():
7878 """Check if server is healthy"""
7979 try :
80- response = requests .get ("http://localhost:8000/v1/ health" , timeout = 5 )
80+ response = requests .get ("http://localhost:8000/health" , timeout = 5 )
8181 return response .status_code == 200
8282 except requests .exceptions .RequestException :
8383 return False
@@ -515,7 +515,10 @@ class TestConversationLoggingPerformanceWithServer(unittest.TestCase):
515515
516516 def setUp (self ):
517517 """Check server availability"""
518- if not requests .get ("http://localhost:8000/v1/health" , timeout = 2 ).status_code == 200 :
518+ try :
519+ if requests .get ("http://localhost:8000/health" , timeout = 2 ).status_code != 200 :
520+ self .skipTest ("OptILLM server not available" )
521+ except requests .exceptions .RequestException :
519522 self .skipTest ("OptILLM server not available" )
520523
521524 self .client = OpenAI (api_key = "optillm" , base_url = "http://localhost:8000/v1" )
0 commit comments