Skip to content

Commit

Permalink
Merge pull request #63479 from rafiss/backport21.1-63154
Browse files Browse the repository at this point in the history
release-21.1: roachtest: upgrade ORM versions under test
  • Loading branch information
rafiss authored Apr 12, 2021
2 parents 8f66611 + cd705a2 commit d72e42d
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 1,506 deletions.
6 changes: 3 additions & 3 deletions pkg/cmd/roachtest/activerecord.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
var activerecordResultRegex = regexp.MustCompile(`^(?P<test>[^\s]+#[^\s]+) = (?P<timing>\d+\.\d+ s) = (?P<result>.)$`)
var railsReleaseTagRegex = regexp.MustCompile(`^v(?P<major>\d+)\.(?P<minor>\d+)\.(?P<point>\d+)\.?(?P<subpoint>\d*)$`)
var supportedRailsVersion = "6.1"
var adapterVersion = "v6.1.0-beta.2"
var activerecordAdapterVersion = "v6.1.0-beta.3"

// This test runs activerecord's full test suite against a single cockroach node.

Expand Down Expand Up @@ -81,7 +81,7 @@ func registerActiveRecord(r *testRegistry) {
}
c.l.Printf("Latest rails release is %s.", latestTag)
c.l.Printf("Supported rails release is %s.", supportedRailsVersion)
c.l.Printf("Supported adapter version is %s.", adapterVersion)
c.l.Printf("Supported adapter version is %s.", activerecordAdapterVersion)

if err := repeatRunE(
ctx, c, node, "update apt-get", `sudo apt-get -qq update`,
Expand Down Expand Up @@ -125,7 +125,7 @@ func registerActiveRecord(r *testRegistry) {
c,
"https://github.com/cockroachdb/activerecord-cockroachdb-adapter.git",
"/mnt/data1/activerecord-cockroachdb-adapter",
adapterVersion,
activerecordAdapterVersion,
node,
); err != nil {
t.Fatal(err)
Expand Down
6 changes: 4 additions & 2 deletions pkg/cmd/roachtest/django.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import (
var djangoReleaseTagRegex = regexp.MustCompile(`^(?P<major>\d+)\.(?P<minor>\d+)(\.(?P<point>\d+))?$`)
var djangoCockroachDBReleaseTagRegex = regexp.MustCompile(`^(?P<major>\d+)\.(?P<minor>\d+)$`)

var djangoSupportedTag = "cockroach-3.1.x"
var djangoSupportedTag = "cockroach-3.2.x"
var djangoCockroachDBSupportedTag = "3.2"

func registerDjango(r *testRegistry) {
runDjango := func(
Expand Down Expand Up @@ -126,14 +127,15 @@ func registerDjango(r *testRegistry) {
t.Fatal(err)
}
c.l.Printf("Latest django-cockroachdb release is %s.", djangoCockroachDBLatestTag)
c.l.Printf("Supported django-cockroachdb release is %s.", djangoCockroachDBSupportedTag)

if err := repeatGitCloneE(
ctx,
t.l,
c,
"https://github.com/cockroachdb/django-cockroachdb",
"/mnt/data1/django/tests/django-cockroachdb",
"master",
djangoCockroachDBSupportedTag,
node,
); err != nil {
t.Fatal(err)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/roachtest/gopg.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

// Currently, we're running a version like 'v9.0.1'.
var gopgReleaseTagRegex = regexp.MustCompile(`^v(?P<major>\d+)(?:\.(?P<minor>\d+)(?:\.(?P<point>\d+))?)?$`)
var gopgSupportedTag = "v10.0.1"
var gopgSupportedTag = "v10.9.0"

// This test runs gopg full test suite against a single cockroach node.
func registerGopg(r *testRegistry) {
Expand Down
4 changes: 3 additions & 1 deletion pkg/cmd/roachtest/libpq.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
)

var libPQReleaseTagRegex = regexp.MustCompile(`^v(?P<major>\d+)\.(?P<minor>\d+)\.(?P<point>\d+)$`)
var libPQSupportedTag = "v1.10.0"

func registerLibPQ(r *testRegistry) {
runLibPQ := func(ctx context.Context, t *test, c *cluster) {
Expand All @@ -42,6 +43,7 @@ func registerLibPQ(r *testRegistry) {
t.Fatal(err)
}
c.l.Printf("Latest lib/pq release is %s.", latestTag)
c.l.Printf("Supported lib/pq release is %s.", libPQSupportedTag)

installLatestGolang(ctx, t, c, node)

Expand Down Expand Up @@ -73,7 +75,7 @@ func registerLibPQ(r *testRegistry) {
c,
fmt.Sprintf("https://%s.git", libPQRepo),
libPQPath,
latestTag,
libPQSupportedTag,
node,
); err != nil {
t.Fatal(err)
Expand Down
15 changes: 8 additions & 7 deletions pkg/cmd/roachtest/pgjdbc.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
)

var pgjdbcReleaseTagRegex = regexp.MustCompile(`^REL(?P<major>\d+)\.(?P<minor>\d+)\.(?P<point>\d+)$`)
var supportedPGJDBCTag = "REL42.2.9"
var supportedPGJDBCTag = "REL42.2.19"

// This test runs pgjdbc's full test suite against a single cockroach node.

Expand Down Expand Up @@ -54,6 +54,7 @@ func registerPgjdbc(r *testRegistry) {
t.Fatal(err)
}
c.l.Printf("Latest pgjdbc release is %s.", latestTag)
c.l.Printf("Supported pgjdbc release is %s.", supportedPGJDBCTag)

if err := repeatRunE(
ctx, c, node, "update apt-get", `sudo apt-get -qq update`,
Expand All @@ -66,7 +67,7 @@ func registerPgjdbc(r *testRegistry) {
c,
node,
"install dependencies",
`sudo apt-get -qq install default-jre openjdk-8-jdk-headless maven`,
`sudo apt-get -qq install default-jre openjdk-11-jdk-headless maven`,
); err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -113,7 +114,7 @@ func registerPgjdbc(r *testRegistry) {
c,
node,
"building pgjdbc (without tests)",
`cd /mnt/data1/pgjdbc/pgjdbc/ && mvn -Dtest=OidToStringTest test`,
`cd /mnt/data1/pgjdbc/pgjdbc/ && ../gradlew test --tests OidToStringTest`,
); err != nil {
t.Fatal(err)
}
Expand All @@ -133,7 +134,7 @@ func registerPgjdbc(r *testRegistry) {
// Note that this is expected to return an error, since the test suite
// will fail. And it is safe to swallow it here.
_ = c.RunE(ctx, node,
`cd /mnt/data1/pgjdbc/pgjdbc/ && mvn test`,
`cd /mnt/data1/pgjdbc/pgjdbc/ && ../gradlew test`,
)

_ = c.RunE(ctx, node,
Expand All @@ -150,7 +151,7 @@ func registerPgjdbc(r *testRegistry) {
c,
node,
"copy test result files",
`cp /mnt/data1/pgjdbc/pgjdbc/target/surefire-reports ~/logs/report/pgjdbc-results -a`,
`cp /mnt/data1/pgjdbc/pgjdbc/build/test-results/test/ ~/logs/report/pgjdbc-results -a`,
); err != nil {
t.Fatal(err)
}
Expand All @@ -163,7 +164,7 @@ func registerPgjdbc(r *testRegistry) {
t.l,
node,
"get list of test files",
`ls /mnt/data1/pgjdbc/pgjdbc/target/surefire-reports/*.xml`,
`ls /mnt/data1/pgjdbc/pgjdbc/build/test-results/test/*.xml`,
)
if err != nil {
t.Fatal(err)
Expand All @@ -179,7 +180,7 @@ func registerPgjdbc(r *testRegistry) {
}

r.Add(testSpec{
MinVersion: "v2.1.0",
MinVersion: "v20.1.0",
Name: "pgjdbc",
Owner: OwnerSQLExperience,
Cluster: makeClusterSpec(1),
Expand Down
Loading

0 comments on commit d72e42d

Please sign in to comment.