Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLASH-244] Add full-stack test #141

Merged
merged 51 commits into from
Jul 30, 2019
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
a180085
add simple full stack test
lidezhu Jul 24, 2019
51d5212
add port configuration
lidezhu Jul 24, 2019
4eb0281
small fix
lidezhu Jul 24, 2019
467bc60
small fix
lidezhu Jul 24, 2019
a10fe23
add sleep function to tests
lidezhu Jul 24, 2019
5f0141f
fix sleep function
lidezhu Jul 24, 2019
46104ac
add drop table to test case
lidezhu Jul 24, 2019
26cfe74
small fix
lidezhu Jul 24, 2019
1cb7ef2
refactor run-test
lidezhu Jul 24, 2019
3a7822b
initial full-stack test generator
lidezhu Jul 25, 2019
cf3d947
add regenerate_test variable
lidezhu Jul 25, 2019
1d1eca4
renew test case
lidezhu Jul 25, 2019
69c13e6
fix test case generator bug
lidezhu Jul 25, 2019
2a6da76
modify ci shell
lidezhu Jul 25, 2019
e42484c
fix typo and remove useless file
lidezhu Jul 25, 2019
4053f63
fix interation fail
lidezhu Jul 26, 2019
c41bd5c
rename test and add comment to docker-compose
lidezhu Jul 26, 2019
e6c18b5
add new docker image with mysql client
lidezhu Jul 26, 2019
9d2ca44
modify dockerfile
lidezhu Jul 26, 2019
e3f9fa8
modify run shell
lidezhu Jul 26, 2019
37f4f64
finish fullstack-test generator
lidezhu Jul 28, 2019
d44a224
create directory is not exists
lidezhu Jul 28, 2019
24cb348
modify sample test
lidezhu Jul 28, 2019
e9f04dc
fix sample test syntax error
lidezhu Jul 28, 2019
b3030a0
add sleep before select
lidezhu Jul 28, 2019
4451b9f
remove decimal(65,30) type
lidezhu Jul 28, 2019
c139c53
make null default value
lidezhu Jul 28, 2019
c930a57
small fix
lidezhu Jul 28, 2019
8b14955
remove unnecessary sleep
lidezhu Jul 28, 2019
5b717d3
small fix
lidezhu Jul 28, 2019
f58baa2
small fix
lidezhu Jul 28, 2019
a8c562f
small fix
lidezhu Jul 28, 2019
64c1396
modify docker run shell
lidezhu Jul 28, 2019
4ec23cf
modify config file
lidezhu Jul 28, 2019
6899e99
fix create database behavior
lidezhu Jul 28, 2019
21b4aa6
modify tidb address
lidezhu Jul 28, 2019
a0b082f
modify to original config
lidezhu Jul 28, 2019
c0fed7b
try get host address
lidezhu Jul 29, 2019
ab0dc8a
small fix
lidezhu Jul 29, 2019
678e396
fix file name
lidezhu Jul 29, 2019
213b69b
fix config file
lidezhu Jul 29, 2019
674496e
add blank line to generated config file
lidezhu Jul 29, 2019
20c0549
add file
lidezhu Jul 29, 2019
2c1f51c
fix wrong genration tikv-learner.toml
lidezhu Jul 29, 2019
51f295b
enable auto generate test case and add sleep function after first insert
lidezhu Jul 29, 2019
f92fc9b
fix typo
lidezhu Jul 29, 2019
1616bf6
Merge branch 'master' into FLASH-244
lidezhu Jul 29, 2019
f6e3158
remove auto-generated visual test
lidezhu Jul 29, 2019
03c6891
Merge branch 'FLASH-244' of github.com:lidezhu/tics into FLASH-244
lidezhu Jul 29, 2019
c891b0c
rename tidbc to mysql_client
lidezhu Jul 29, 2019
10471ba
rename tdbc to mysql_client
lidezhu Jul 30, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added tests/.DS_Store
Binary file not shown.
15 changes: 15 additions & 0 deletions tests/_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,24 @@ export storage_server_config="../../running/config/config.xml"
# Server address for connecting
export storage_server="127.0.0.1"

# Server port for connecting
export storage_port="9000"

# Default database for scripts
export storage_db="default"

# TiDB address
export tidb_server="127.0.0.1"

# TiDB port
export tidb_port="4000"

# TiDB default database
export tidb_db="test"

# TiDB default table
export tidb_table="t"

# Setup running env vars
source ../../_vars.sh
setup_dylib_path
54 changes: 54 additions & 0 deletions tests/docker/config/pd.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# PD Configuration
initial-cluster-state = "new"

enable-prevote = true
lease = 3
namespace-classifier = "table"
tso-save-interval = "3s"

[security]
cacert-path = ""
cert-path = ""
key-path = ""

[log]
level = "info"

[log.file]

[metric]

[schedule]
leader-schedule-limit = 4
max-merge-region-keys = 0
max-merge-region-size = 0
max-pending-peer-count = 16
max-snapshot-count = 3
max-store-down-time = "3000h"
merge-schedule-limit = 0
region-schedule-limit = 20
replica-schedule-limit = 20
split-merge-interval = "1h"
tolerant-size-ratio = 5.0

# [[schedule.schedulers]]
# type = "balance-hot-region-scheduler"
# disable = true
# [[schedule.schedulers]]
# type = "label-scheduler"
# disable = true
# [[schedule.schedulers]]
# type = "balance-region-scheduler"
# disable = true
# [[schedule.schedulers]]
# type = "balance-leader-scheduler"
# disable = true

[replication]
location-labels = []
max-replicas = 1

[label-property]
[[label-property.slave]]
key = "zone"
value = "engine"
93 changes: 93 additions & 0 deletions tests/docker/config/tidb.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# TiDB Configuration.

compatible-kill-query = false
enable-streaming = false
host = "0.0.0.0"
lease = "45s"
lower-case-table-names = 2
oom-action = "log"
run-ddl = true
socket = ""
split-table = true
store = "tikv"
token-limit = 10000

[log]
disable-timestamp = false
expensive-threshold = 10000
format = "text"
level = "info"
query-log-max-len = 2048
slow-threshold = 6000

[log.file]
log-rotate = true
max-backups = 0
max-days = 0
max-size = 300

[security]
cluster-ssl-ca = ""
cluster-ssl-cert = ""
cluster-ssl-key = ""
ssl-ca = ""
ssl-cert = ""
ssl-key = ""

[status]
report-status = true

[performance]
cross-join = true
feedback-probability = 0.05
force-priority = "NO_PRIORITY"
max-procs = 0
pseudo-estimate-ratio = 0.8
query-feedback-limit = 1024
run-auto-analyze = false
stats-lease = "3s"
stmt-count-limit = 100000000
tcp-keep-alive = true

[proxy-protocol]
header-timeout = 5
networks = ""

[prepared-plan-cache]
capacity = 1000
enabled = true

[opentracing]
enable = false
rpc-metrics = false

[opentracing.reporter]
buffer-flush-interval = 0
local-agent-host-port = ""
log-spans = false
queue-size = 0

[opentracing.sampler]
max-operations = 0
param = 1.0
sampling-refresh-interval = 0
sampling-server-url = ""
type = "const"

[tikv-client]
batch-wait-size = 16
batch-wait-time = 3000000
commit-timeout = "60s"
grpc-connection-count = 4
grpc-keepalive-time = 10
grpc-keepalive-timeout = 3
max-batch-size = 128
tikv-heavy-load-to-batch = 30

[txn-local-latches]
capacity = 20480000
enabled = false

[binlog]
ignore-error = false
write-timeout = "15s"
108 changes: 108 additions & 0 deletions tests/docker/config/tiflash-users.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?xml version="1.0"?>
<yandex>
<!-- Profiles of settings. -->
<profiles>
<!-- Default settings. -->
<default>
<!-- Maximum memory usage for processing single query, in bytes. -->
<max_memory_usage>4000000000</max_memory_usage>

<!-- Use cache of uncompressed blocks of data. Meaningful only for processing many of very short queries. -->
<use_uncompressed_cache>0</use_uncompressed_cache>

<!-- How to choose between replicas during distributed query processing.
random - choose random replica from set of replicas with minimum number of errors
nearest_hostname - from set of replicas with minimum number of errors, choose replica
with minumum number of different symbols between replica's hostname and local hostname
(Hamming distance).
in_order - first live replica is choosen in specified order.
-->
<load_balancing>random</load_balancing>
</default>

<!-- Profile that allows only read queries. -->
<readonly>
<readonly>1</readonly>
</readonly>
</profiles>

<!-- Users and ACL. -->
<users>
<!-- If user name was not specified, 'default' user is used. -->
<default>
<!-- Password could be specified in plaintext or in SHA256 (in hex format).

If you want to specify password in plaintext (not recommended), place it in 'password' element.
Example: <password>qwerty</password>.
Password could be empty.

If you want to specify SHA256, place it in 'password_sha256_hex' element.
Example: <password_sha256_hex>65e84be33532fb784c48129675f9eff3a682b27168c0ea744b2cf58ee02337c5</password_sha256_hex>

How to generate decent password:
Execute: PASSWORD=$(base64 < /dev/urandom | head -c8); echo "$PASSWORD"; echo -n "$PASSWORD" | sha256sum | tr -d '-'
In first line will be password and in second - corresponding SHA256.
-->
<password></password>

<!-- List of networks with open access.

To open access from everywhere, specify:
<ip>::/0</ip>

To open access only from localhost, specify:
<ip>::1</ip>
<ip>127.0.0.1</ip>

Each element of list has one of the following forms:
<ip> IP-address or network mask. Examples: 213.180.204.3 or 10.0.0.1/8 or 2a02:6b8::3 or 2a02:6b8::3/64.
<host> Hostname. Example: server01.yandex.ru.
To check access, DNS query is performed, and all received addresses compared to peer address.
<host_regexp> Regular expression for host names. Example, ^server\d\d-\d\d-\d\.yandex\.ru$
To check access, DNS PTR query is performed for peer address and then regexp is applied.
Then, for result of PTR query, another DNS query is performed and all received addresses compared to peer address.
Strongly recommended that regexp is ends with $
All results of DNS requests are cached till server restart.
-->
<networks>
<ip>::/0</ip>
</networks>

<!-- Settings profile for user. -->
<profile>default</profile>

<!-- Quota for user. -->
<quota>default</quota>
</default>

<!-- Example of user with readonly access. -->
<readonly>
<password></password>
<networks>
<ip>::1</ip>
<ip>127.0.0.1</ip>
</networks>
<profile>readonly</profile>
<quota>default</quota>
</readonly>
</users>

<!-- Quotas. -->
<quotas>
<!-- Name of quota. -->
<default>
<!-- Limits for time interval. You could specify many intervals with different limits. -->
<interval>
<!-- Length of interval. -->
<duration>3600</duration>

<!-- No limits. Just calculate resource usage for time interval. -->
<queries>0</queries>
<errors>0</errors>
<result_rows>0</result_rows>
<read_rows>0</read_rows>
<execution_time>0</execution_time>
</interval>
</default>
</quotas>
</yandex>
Loading