Skip to content

Commit 7dbf9eb

Browse files
fix logging OOM issue during e2e tests
1 parent a9ab04f commit 7dbf9eb

4 files changed

Lines changed: 5 additions & 14 deletions

File tree

drift/instrumentation/e2e_common/base_runner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ def record_traces(self) -> bool:
150150
self.app_process = subprocess.Popen(
151151
["python", "src/app.py"],
152152
env={**os.environ, **env},
153-
stdout=subprocess.PIPE,
154-
stderr=subprocess.STDOUT,
153+
stdout=subprocess.DEVNULL,
154+
stderr=subprocess.DEVNULL,
155155
text=True,
156156
)
157157

drift/instrumentation/psycopg/e2e-tests/src/app.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -723,14 +723,6 @@ def test_binary_format():
723723
except Exception as e:
724724
return jsonify({"error": str(e)}), 500
725725

726-
727-
# =====================================================================
728-
# BUG-EXPOSING TEST ENDPOINTS
729-
# These endpoints expose confirmed bugs in the psycopg instrumentation.
730-
# See BUG_TRACKING.md for detailed analysis.
731-
# =====================================================================
732-
733-
734726
@app.route("/test/null-values")
735727
def test_null_values():
736728
"""Test handling of NULL values in results."""

drift/instrumentation/psycopg/e2e-tests/src/test_requests.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@
7575
# Test: Transaction context manager
7676
make_request("GET", "/test/transaction-context")
7777

78-
# These still need investigation:
79-
# make_request("GET", "/test/json-jsonb")
80-
# make_request("GET", "/test/array-types")
78+
# JSON/JSONB and array types tests
79+
make_request("GET", "/test/json-jsonb")
80+
make_request("GET", "/test/array-types")
8181

8282
print_request_summary()

drift/instrumentation/psycopg/instrumentation.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,6 @@ def _mock_execute_with_data(self, cursor: Any, mock_data: dict[str, Any]) -> Non
12021202
# The SDK communicator already extracts response.body from the CLI's MockInteraction structure
12031203
# So mock_data should already contain: {"rowcount": ..., "description": [...], "rows": [...]}
12041204
actual_data = mock_data
1205-
logger.debug(f"[MOCK_DATA] mock_data: {mock_data}")
12061205

12071206
try:
12081207
cursor._rowcount = actual_data.get("rowcount", -1)

0 commit comments

Comments
 (0)