-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
close #8578
- Loading branch information
1 parent
0b20c02
commit 46e46dd
Showing
11 changed files
with
114 additions
and
36 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,13 +1,17 @@ | ||
## How to run test cases in local | ||
|
||
1. Deploy a cluster using [ti.sh](https://github.com/pingcap/tiflash/blob/master/integrated/docs/ti.sh.md) | ||
For running intergration test cases (defined in `./fullstack-test`, `./fullstack-test-dt`, `./new_collation_fullstack`), you should define a TiDB cluster with TiFlash node (1 PD, 1 TiKV, 1 TiDB, 1 TiFlash at least). | ||
|
||
1. Deploy a cluster using [tiup](https://tiup.io/) | ||
2. Use `ti.sh x.ti prop` to ensure the ports of your cluster | ||
3. Change the "storage_port", "tidb_port" in `./env.sh` to let it connect to your cluster | ||
4. Run tests with `./run-test.sh fullstack-test/ddl` | ||
|
||
Instead of ti.sh, you can deploy a cluster with [TiUP](https://tiup.io/). But ti.sh is more easy to replace the binary for TiFlash/TiDB/PD, which is convenient for debugging. | ||
|
||
* For running mock test cases (defined in `./delta-merge-test`), you should define a cluster with only one TiFlash node, and set standalone property for that node. | ||
|
||
* For running intergration test cases (defined in `./fullstack-test`, `./fullstack-test-dt`, `./new_collation_fullstack`), you should define a TiDB cluster with TiFlash node (1 PD, 1 TiKV, 1 TiDB, 1 TiFlash at least). | ||
## How to run test cases in `delta-merge-test` | ||
|
||
For running mock test cases (defined in `./delta-merge-test`), you should start a standalone tiflash that is not connected to tidb cluster | ||
``` | ||
export TIFLASH_PORT=9000 | ||
./tiflash server -- --path /tmp/tiflash/data --tcp_port ${TIFLASH_PORT} | ||
storage_port=${TIFLASH_PORT} verbose=true ./run-test.sh delta-merge-test | ||
``` |
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
39 changes: 39 additions & 0 deletions
39
tests/delta-merge-test/raft/schema/concurrent_ddl_conflict.test
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,39 @@ | ||
# Copyright 2023 PingCAP, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Preparation. | ||
=> DBGInvoke __enable_schema_sync_service('false') | ||
|
||
=> DBGInvoke __drop_tidb_table(default, test) | ||
|
||
=> DBGInvoke __mock_tidb_table(default, test, 'col_1 String', '', 'dt') | ||
=> DBGInvoke __refresh_mapped_table_schema(default, test) | ||
=> DBGInvoke __put_region(4, 0, 100, default, test) | ||
=> DBGInvoke __skip_schema_version() | ||
=> DBGInvoke __add_column_to_tidb_table(default, test, 'col_2 Nullable(Int8)') | ||
=> DBGInvoke __add_column_to_tidb_table(default, test, 'col_3 Nullable(Int32)') | ||
=> DBGInvoke __refresh_schemas() | ||
=> DBGInvoke __raft_insert_row(default, test, 4, 50, 'test1', 1, 65536) | ||
|
||
# Sync add column by reading. | ||
>> DBGInvoke query_mapped('select col_1,col_2,col_3 from \$d.\$t', default, test) | ||
┌─col_1─┬─col_2─┬─col_3─┐ | ||
│ test1 │ 1 │ 65536 │ | ||
└───────┴───────┴───────┘ | ||
|
||
# Clean up. | ||
=> DBGInvoke __drop_tidb_table(default, test) | ||
=> DBGInvoke __refresh_schemas() | ||
=> DBGInvoke __enable_schema_sync_service('true') | ||
|
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