Setup TiDB for local testing
This commit is contained in:
parent
173e247812
commit
d4abf0819a
|
@ -41,7 +41,6 @@ stage('Configure') {
|
||||||
// new BuildEnvironment( dbName: 'hana_cloud', dbLockableResource: 'hana-cloud', dbLockResourceAsHost: true ),
|
// new BuildEnvironment( dbName: 'hana_cloud', dbLockableResource: 'hana-cloud', dbLockResourceAsHost: true ),
|
||||||
new BuildEnvironment( node: 's390x' ),
|
new BuildEnvironment( node: 's390x' ),
|
||||||
new BuildEnvironment( dbName: 'tidb', node: 'tidb',
|
new BuildEnvironment( dbName: 'tidb', node: 'tidb',
|
||||||
additionalOptions: '-DdbHost=localhost:4000',
|
|
||||||
notificationRecipients: 'tidb_hibernate@pingcap.com' ),
|
notificationRecipients: 'tidb_hibernate@pingcap.com' ),
|
||||||
new BuildEnvironment( testJdkVersion: '17' ),
|
new BuildEnvironment( testJdkVersion: '17' ),
|
||||||
// We want to enable preview features when testing newer builds of OpenJDK:
|
// We want to enable preview features when testing newer builds of OpenJDK:
|
||||||
|
|
|
@ -203,6 +203,10 @@ The following table illustrates a list of commands for various databases that ca
|
||||||
|CockroachDB
|
|CockroachDB
|
||||||
|`./docker_db.sh cockroachdb`
|
|`./docker_db.sh cockroachdb`
|
||||||
|`./gradlew test -Pdb=cockroachdb`
|
|`./gradlew test -Pdb=cockroachdb`
|
||||||
|
|
||||||
|
|TiDB
|
||||||
|
|`./docker_db.sh tidb`
|
||||||
|
|`./gradlew test -Pdb=tidb`
|
||||||
|===
|
|===
|
||||||
|
|
||||||
To stop a container started by `docker`, use the command
|
To stop a container started by `docker`, use the command
|
||||||
|
|
|
@ -799,6 +799,7 @@ tidb_5_1() {
|
||||||
echo "Waiting for TiDB to start..."
|
echo "Waiting for TiDB to start..."
|
||||||
sleep 3
|
sleep 3
|
||||||
done
|
done
|
||||||
|
$CONTAINER_CLI run --link tidb:tidb -it --rm docker.io/mysql:8.0.31 mysql -htidb -P4000 -uroot -e "create database hibernate_orm_test; create user 'hibernate_orm_test' identified by 'hibernate_orm_test'; grant all on hibernate_orm_test.* to 'hibernate_orm_test';"
|
||||||
if [ "$n" -ge 5 ]; then
|
if [ "$n" -ge 5 ]; then
|
||||||
echo "TiDB failed to start and configure after 15 seconds"
|
echo "TiDB failed to start and configure after 15 seconds"
|
||||||
else
|
else
|
||||||
|
|
|
@ -128,7 +128,7 @@ ext {
|
||||||
'jdbc.driver': 'com.mysql.jdbc.Driver',
|
'jdbc.driver': 'com.mysql.jdbc.Driver',
|
||||||
'jdbc.user' : 'hibernate_orm_test',
|
'jdbc.user' : 'hibernate_orm_test',
|
||||||
'jdbc.pass' : 'hibernate_orm_test',
|
'jdbc.pass' : 'hibernate_orm_test',
|
||||||
'jdbc.url' : 'jdbc:mysql://' + dbHost + '/hibernate_orm_test',
|
'jdbc.url' : 'jdbc:mysql://' + dbHost + ':4000/hibernate_orm_test',
|
||||||
'connection.init_sql' : ''
|
'connection.init_sql' : ''
|
||||||
],
|
],
|
||||||
oracle : [
|
oracle : [
|
||||||
|
|
Loading…
Reference in New Issue