Commit 2c442bd
committed
Fix JDBC exception log test filtering
The JDBC exception signal log test used waitAndAssertLogRecords(), which
expects the captured log list to contain only the asserted records. In these
test runs, unrelated JDBC driver or pool logs can be captured first, and the
logged exception class/message can be normalized differently from the thrown
SQLException subtype.
Restore filtering to the db.client.operation.exception log record and assert
that the exception attributes are present instead of matching the exact thrown
exception values.
Validation: .\gradlew.bat :instrumentation:jdbc:library:testExceptionSignalLogs :instrumentation:jdbc:javaagent:testExceptionSignalLogs --no-build-cache1 parent 48a969b commit 2c442bd
1 file changed
Lines changed: 24 additions & 10 deletions
File tree
- instrumentation/jdbc/testing/src/main/java/io/opentelemetry/instrumentation/jdbc/testing
Lines changed: 24 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| 55 | + | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| |||
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| 81 | + | |
79 | 82 | | |
80 | 83 | | |
81 | 84 | | |
| |||
456 | 459 | | |
457 | 460 | | |
458 | 461 | | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
| 462 | + | |
469 | 463 | | |
470 | 464 | | |
471 | 465 | | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
472 | 486 | | |
473 | 487 | | |
474 | 488 | | |
| |||
0 commit comments