Skip to content

Commit

Permalink
fix the test
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo82148 committed Jun 26, 2021
1 parent 03b8be0 commit 52f2d61
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tracer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ func TestTraceProxy(t *testing.T) {
timeComponent := `\(\d+(?:\.\d+)?[^\)]+\)`
expected := []*regexp.Regexp{
// Fake time component with (\d+\.\d+[^\)]+)
regexp.MustCompile(`tracer_test.go:27: Open 0x[0-9a-f]+ ` + timeComponent),
regexp.MustCompile(`tracer_test.go:27: Exec 0x[0-9a-f]+: CREATE TABLE t1 \(id INTEGER PRIMARY KEY\); args = \[\] ` + timeComponent),
regexp.MustCompile(`tracer_test.go:34: Begin 0x[0-9a-f]+ ` + timeComponent),
regexp.MustCompile(`tracer_test.go:39: Exec 0x[0-9a-f]+: INSERT INTO t1 \(id\) VALUES\(\?\); args = \[1\] ` + timeComponent),
regexp.MustCompile(`tracer_test.go:42: Query 0x[0-9a-f]+: SELECT id FROM t1 WHERE id = \?; args = \[1\] ` + timeComponent),
regexp.MustCompile(`tracer_test.go:49: Commit 0x[0-9a-f]+ ` + timeComponent),
regexp.MustCompile(`tracer_test.go:57: Begin 0x[0-9a-f]+ ` + timeComponent),
regexp.MustCompile(`tracer_test.go:61: Rollback 0x[0-9a-f]+ ` + timeComponent),
regexp.MustCompile(`tracer_test.go:28: Open 0x[0-9a-f]+ ` + timeComponent),
regexp.MustCompile(`tracer_test.go:28: Exec 0x[0-9a-f]+: CREATE TABLE t1 \(id INTEGER PRIMARY KEY\); args = \[\] ` + timeComponent),
regexp.MustCompile(`tracer_test.go:35: Begin 0x[0-9a-f]+ ` + timeComponent),
regexp.MustCompile(`tracer_test.go:40: Exec 0x[0-9a-f]+: INSERT INTO t1 \(id\) VALUES\(\?\); args = \[1\] ` + timeComponent),
regexp.MustCompile(`tracer_test.go:43: Query 0x[0-9a-f]+: SELECT id FROM t1 WHERE id = \?; args = \[1\] ` + timeComponent),
regexp.MustCompile(`tracer_test.go:50: Commit 0x[0-9a-f]+ ` + timeComponent),
regexp.MustCompile(`tracer_test.go:58: Begin 0x[0-9a-f]+ ` + timeComponent),
regexp.MustCompile(`tracer_test.go:62: Rollback 0x[0-9a-f]+ ` + timeComponent),
regexp.MustCompile(`.*:\d+: Close 0x[0-9a-f]+ ` + timeComponent),
}

Expand Down

0 comments on commit 52f2d61

Please sign in to comment.