2
0

Avoid allocating strings in common message types

This commit is contained in:
Jack Christensen
2019-01-01 13:47:37 -06:00
parent 4f0658d52b
commit 356a6c43d2
6 changed files with 45 additions and 51 deletions
+1 -1
View File
@@ -289,7 +289,7 @@ func TestTxCommitExCancel(t *testing.T) {
script.Steps = append(script.Steps, pgmock.PgxInitSteps()...)
script.Steps = append(script.Steps,
pgmock.ExpectMessage(&pgproto3.Query{String: "begin"}),
pgmock.SendMessage(&pgproto3.CommandComplete{CommandTag: "BEGIN"}),
pgmock.SendMessage(&pgproto3.CommandComplete{CommandTag: []byte("BEGIN")}),
pgmock.SendMessage(&pgproto3.ReadyForQuery{TxStatus: 'T'}),
pgmock.WaitForClose(),
)