Skip to content

Commit

Permalink
Fix sql_error_code test with json export
Browse files Browse the repository at this point in the history
  • Loading branch information
bonnefoa committed Jul 2, 2024
1 parent 3446c22 commit b9db908
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion expected/json.out
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ set statement_timeout=200;
/*dddbs='postgres.db',traceparent='00-00000000000000000000000000000001-0000000000000001-01'*/ select * from pg_sleep(1);
ERROR: canceling statement due to statement timeout
-- Check json generated spans with sql error code
set statement_timeout TO DEFAULT;
SELECT trace_id, name, sql_error_code, lvl FROM peek_ordered_json_spans;
trace_id | name | sql_error_code | lvl
----------------------------------+-----------------------------+----------------+-----
Expand All @@ -58,7 +59,6 @@ SELECT trace_id, name, sql_error_code, lvl FROM peek_ordered_json_spans;
00000000000000000000000000000001 | FunctionScan on pg_sleep | 57014 | 3
(4 rows)

set statement_timeout TO DEFAULT;
CALL clean_spans();
-- Test subxact_count with json export
/*dddbs='postgres.db',traceparent='00-00000000000000000000000000000001-0000000000000001-01'*/ BEGIN;
Expand Down
3 changes: 1 addition & 2 deletions sql/json.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@
SELECT trace_id, name, kind, lvl FROM peek_ordered_json_spans;
-- Test plan attributes with json export
SELECT trace_id, name, plan_startup_cost, plan_total_cost, plan_rows, plan_width, lvl FROM peek_ordered_json_spans;

CALL clean_spans();

-- Test error code with json export
set statement_timeout=200;
/*dddbs='postgres.db',traceparent='00-00000000000000000000000000000001-0000000000000001-01'*/ select * from pg_sleep(1);
-- Check json generated spans with sql error code
SELECT trace_id, name, sql_error_code, lvl FROM peek_ordered_json_spans;
set statement_timeout TO DEFAULT;
SELECT trace_id, name, sql_error_code, lvl FROM peek_ordered_json_spans;
CALL clean_spans();

-- Test subxact_count with json export
Expand Down

0 comments on commit b9db908

Please sign in to comment.