Skip to content
Closed
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion cicd/cmd/run-it-tests/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ package main

import (
"flag"
"fmt"
"log"
"math/rand"
"time"

"github.com/GoogleCloudPlatform/DataflowTemplates/cicd/internal/flags"
"github.com/GoogleCloudPlatform/DataflowTemplates/cicd/internal/workflows"
Expand Down Expand Up @@ -46,6 +49,9 @@ func main() {
log.Fatalf("%v\n", err)
}

rand.Seed(time.Now().UnixNano())
randomTeleportSpannerInstance := "teleport" + fmt.Sprint(rand.Intn(4)+1)

// Run integration tests
mvnFlags = workflows.NewMavenFlags()
err = workflows.MvnVerify().Run(
Expand All @@ -59,7 +65,7 @@ func main() {
mvnFlags.ThreadCount(4),
mvnFlags.IntegrationTestParallelism(3),
mvnFlags.StaticBigtableInstance("teleport"),
mvnFlags.StaticSpannerInstance("teleport"),
mvnFlags.StaticSpannerInstance(randomTeleportSpannerInstance),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will mean ALL ITs for a given run will run on the same spanner instance. Is that what we want?
I thought we wanted to a random spanner instance per IT, similar to I think what we did with GCS buckets?

@darshan-sj / @shreyakhajanchi Please confirm.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we had finalized on randomly allocating a bucket out of 10 buckets for each of the IT. I think @asthamohta was OOO at that time and might be unaware of the discussion, PR link

mvnFlags.InternalMaven(),
flags.Region(),
flags.Project(),
Expand Down
Loading