mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
test(test_router.py): handle image gen timeouts
This commit is contained in:
parent
fe632c08a4
commit
990c32a5d6
1 changed files with 9 additions and 2 deletions
|
@ -458,6 +458,8 @@ async def test_aimg_gen_on_router():
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if "Your task failed as a result of our safety system." in str(e):
|
if "Your task failed as a result of our safety system." in str(e):
|
||||||
pass
|
pass
|
||||||
|
elif "Operation polling timed out" in str(e):
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
pytest.fail(f"Error occurred: {e}")
|
pytest.fail(f"Error occurred: {e}")
|
||||||
|
@ -533,8 +535,13 @@ def test_aembedding_on_router():
|
||||||
)
|
)
|
||||||
router.reset()
|
router.reset()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
traceback.print_exc()
|
if "Your task failed as a result of our safety system." in str(e):
|
||||||
pytest.fail(f"Error occurred: {e}")
|
pass
|
||||||
|
elif "Operation polling timed out" in str(e):
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
traceback.print_exc()
|
||||||
|
pytest.fail(f"Error occurred: {e}")
|
||||||
|
|
||||||
|
|
||||||
# test_aembedding_on_router()
|
# test_aembedding_on_router()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue