Skip to content

Commit

Permalink
improve ut coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
lkk12014402 committed Dec 12, 2024
1 parent 60fa89a commit 04b8fd6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/cores/mega/test_dynamic_batching.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

import os
import asyncio
import multiprocessing
import unittest
Expand Down Expand Up @@ -76,6 +77,7 @@ def tearDown(self):
self.process1.terminate()

async def test_dynamic_batching(self):
os.environ['LOGFLAG'] = True
url1 = "http://localhost:8080/v1/add1"
url2 = "http://localhost:8080/v1/add2"

Expand All @@ -89,6 +91,5 @@ async def test_dynamic_batching(self):
self.assertEqual(response1["result"], "processed: Hello, ")
self.assertEqual(response2["result"], "processed: OPEA Project!")


if __name__ == "__main__":
unittest.main()
2 changes: 1 addition & 1 deletion tests/cores/mega/test_hybrid_service_orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_add_remote_service(self):
self.service_builder.add(opea_microservices["s1"]).add(s2)
self.service_builder.flow_to(self.s1, s2)
self.assertEqual(s2.endpoint_path, "http://fakehost:8008/v1/add")

self.assertRaises(Exception, s2._validate_env(), 'N/A')

if __name__ == "__main__":
unittest.main()

0 comments on commit 04b8fd6

Please sign in to comment.