Skip to content

Commit

Permalink
test other project
Browse files Browse the repository at this point in the history
  • Loading branch information
hinthornw committed Apr 12, 2024
1 parent 72d9233 commit 7d303c7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 3 additions & 1 deletion python/tests/integration_tests/fake_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ def fake_function():

@fake_app.post("/fake-route")
async def fake_route(request: Request):
with tracing_context(headers=request.headers):
with tracing_context(
project_name="Definitely-not-your-grandpas-project", headers=request.headers
):
fake_function()
return {"message": "Fake route response"}
9 changes: 5 additions & 4 deletions python/tests/integration_tests/test_context_propagation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import pytest
from httpx import AsyncClient
from uvicorn import Config, Server

from langsmith import traceable
from langsmith.run_helpers import get_current_span
Expand All @@ -17,17 +18,17 @@ def event_loop():

@pytest.fixture(scope="module")
async def fake_server():
from uvicorn import Config, Server

config = Config(app=fake_app, loop="asyncio", port=8000, log_level="info")
server = Server(config=config)

asyncio.create_task(server.serve())
await asyncio.sleep(0.1)

yield

await server.shutdown()
try:
await server.shutdown()
except RuntimeError:
pass


@traceable
Expand Down

0 comments on commit 7d303c7

Please sign in to comment.