Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions misc/mcp-materialize/mcp_materialize/mz_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ async def __aexit__(self, exc_type, exc, tb) -> None:
if self._bg_task:
self._bg_task.cancel()
try:
await self._bg_task
except asyncio.CancelledError:
await asyncio.wait_for(self._bg_task, timeout=5.0)
except (asyncio.CancelledError, asyncio.TimeoutError):
pass

async def _subscribe(self) -> None:
Expand Down Expand Up @@ -125,7 +125,7 @@ async def _subscribe(self) -> None:
)
)
while True:
await cur.execute("FETCH ALL c")
await cur.execute("FETCH ALL c WITH (timeout = '5s')")
reload = False
async for row in cur:
if not row["mz_progressed"]:
Expand Down
11 changes: 8 additions & 3 deletions misc/mcp-materialize/mzcompose.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@

from dataclasses import dataclass

from materialize.mzcompose.composition import Composition, WorkflowArgumentParser
from materialize.mzcompose.composition import (
Composition,
Service,
WorkflowArgumentParser,
)
from materialize.mzcompose.services.materialized import Materialized
from materialize.mzcompose.services.mcp import Mcp

Expand Down Expand Up @@ -42,6 +46,8 @@ def workflow_default(c: Composition, parser: WorkflowArgumentParser) -> None:
parser.add_argument("-s", action="store_true", help="don't suppress output")
args = parser.parse_args()

c.up(Service("mcp", idle=True))

for test_case in test_cases:
if args.filter in test_case.name:
print(f"> Running test case {test_case.name}")
Expand All @@ -54,8 +60,7 @@ def workflow_default(c: Composition, parser: WorkflowArgumentParser) -> None:
"default_cluster_replication_factor": "1"
},
)
# TODO: Remove -vvv again when database-issues#9927 is fixed
test_args = ["tests/", "-vvv"]
test_args = ["tests/"]
if args.k:
test_args.append(f"-k {args.k}")
if args.s:
Expand Down
Loading