forked from pingcap/tidb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into add-bootstrap-sql
* upstream/master: (38 commits) planner: disable collate clause support for enum or set column (pingcap#35684) *: Provide a util to "pause" session in uint test (pingcap#35529) ddl: implement the core for multi-schema change (pingcap#35429) parser: XXXDatabaseStmt now use CIStr for DB name (pingcap#35668) *: remove real tikv test on github actions (pingcap#35710) lightning: support disable scheduler by key range (pingcap#34130) Revert "planner: fix the wrong cost formula of MPPExchanger" (pingcap#35707) ddl, owner: refresh ddl sequence cache after becoming the owner (pingcap#35516) store/copr: fix tiflash integration test by disable paging on tiflash (pingcap#35674) planner: new cost formula for IndexJoin (pingcap#35671) BR: fix backup ranges total time summary log (pingcap#35552) raw_restore: fix the issue that raw restore rewrite the t prefix keys (pingcap#35641) table: fix cannot find the temp table when it's created in a transaction (pingcap#35663) metrics: replace histogram with counter for DistSQLCoprCache (pingcap#35514) *: enable exportloopref (pingcap#35680) types: fix bad error message for numeric conversion issue#32744 (pingcap#34047) *: enable ineffassign (pingcap#35670) config, sysvar: map `max-server-connections` to `max_connections` (pingcap#35453) *: enable durationcheck for nogo linter (pingcap#35661) *: fix issue of cast string as time is incompatible with MySQL (pingcap#35455) ...
- Loading branch information
Showing
254 changed files
with
5,108 additions
and
3,083 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright 2022 PingCAP, Inc. Licensed under Apache-2.0. | ||
|
||
package errors_test | ||
|
||
import ( | ||
"context" | ||
"net/url" | ||
"testing" | ||
|
||
"github.com/pingcap/errors" | ||
berrors "github.com/pingcap/tidb/br/pkg/errors" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestIsContextCanceled(t *testing.T) { | ||
require.False(t, berrors.IsContextCanceled(nil)) | ||
require.False(t, berrors.IsContextCanceled(errors.New("connection closed"))) | ||
require.True(t, berrors.IsContextCanceled(context.Canceled)) | ||
require.True(t, berrors.IsContextCanceled(context.DeadlineExceeded)) | ||
require.True(t, berrors.IsContextCanceled(errors.Trace(context.Canceled))) | ||
require.True(t, berrors.IsContextCanceled(errors.Trace(context.DeadlineExceeded))) | ||
require.True(t, berrors.IsContextCanceled(&url.Error{Err: context.Canceled})) | ||
require.True(t, berrors.IsContextCanceled(&url.Error{Err: context.DeadlineExceeded})) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.