Skip to content

Commit

Permalink
Fixed test of wrong keyword 'SELICT'
Browse files Browse the repository at this point in the history
  • Loading branch information
asmyasnikov committed Nov 20, 2024
1 parent 21445a7 commit 15b99ae
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/integration/table_scan_error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"context"
"fmt"
"os"
"strings"
"testing"

"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -74,5 +75,11 @@ func TestIssue847ScanError(t *testing.T) {
return res.Err()
}, table.WithTxSettings(table.TxSettings(table.WithSnapshotReadOnly())))
require.Error(t, err)
require.ErrorContains(t, err, "Unexpected token 'SELICT'")
if !strings.Contains(
err.Error(), "Unexpected token 'SELICT'", /*antlr3 parser*/
) && !strings.Contains(
err.Error(), "mismatched input 'SELICT'", /*antlr4 parser*/
) {
t.Fail()
}
}

0 comments on commit 15b99ae

Please sign in to comment.