diff --git a/Dockerfile b/Dockerfile index 6ec58be..262f65d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21.1-bookworm +FROM golang:1.24.9-bookworm WORKDIR /tests diff --git a/main.sh b/main.sh index 76ed671..5ef99ae 100755 --- a/main.sh +++ b/main.sh @@ -39,8 +39,13 @@ ingestor_username=${13} ingestor_password=${14} stream_name=$(head /dev/urandom | tr -dc a-z | head -c10) +parallel_flag="" +if [ "$mode" = "load-parallel" ]; then + parallel_flag="-test.parallel=10" +fi + run () { - ./quest.test -test.v -mode="$mode" -query-url="$endpoint" -stream="$stream_name" -query-user="$username" -query-pass="$password" -minio-url="$minio_url" -minio-user="$minio_access_key" -minio-pass="$minio_secret_key" -minio-bucket="$minio_bucket" -ingestor-url="$ingestor_endpoint" -ingestor-user="$ingestor_username" -ingestor-pass="$ingestor_password" + ./quest.test -test.v $parallel_flag -mode="$mode" -query-url="$endpoint" -stream="$stream_name" -query-user="$username" -query-pass="$password" -minio-url="$minio_url" -minio-user="$minio_access_key" -minio-pass="$minio_secret_key" -minio-bucket="$minio_bucket" -ingestor-url="$ingestor_endpoint" -ingestor-user="$ingestor_username" -ingestor-pass="$ingestor_password" return $? } diff --git a/quest_test.go b/quest_test.go index fd1d3f0..b1e141f 100644 --- a/quest_test.go +++ b/quest_test.go @@ -101,7 +101,7 @@ func TestLoadStream_StaticSchema_EventWithSameFields(t *testing.T) { func TestLoadStreamBatchWithK6_StaticSchema(t *testing.T) { t.Parallel() client := testClient(t) - if NewGlob.Mode == "load" { + if NewGlob.Mode == "load" || NewGlob.Mode == "load-parallel" { stream := uniqueStream(t) staticSchemaFlagHeader := map[string]string{"X-P-Static-Schema-Flag": "true"} CreateStreamWithSchemaBody(t, client, stream, staticSchemaFlagHeader, SchemaPayload) @@ -538,7 +538,7 @@ func TestSmokeRoles(t *testing.T) { func TestLoadStreamBatchWithK6(t *testing.T) { t.Parallel() client := testClient(t) - if NewGlob.Mode == "load" { + if NewGlob.Mode == "load" || NewGlob.Mode == "load-parallel" { stream := uniqueStream(t) CreateStream(t, client, stream) if NewGlob.IngestorUrl.String() == "" { @@ -636,7 +636,7 @@ func TestLoadStreamBatchWithCustomPartitionWithK6(t *testing.T) { func TestLoadStreamNoBatchWithK6(t *testing.T) { t.Parallel() - if NewGlob.Mode == "load" { + if NewGlob.Mode == "load" || NewGlob.Mode == "load-parallel" { client := testClient(t) stream := uniqueStream(t) CreateStream(t, client, stream)