From 4f779add0836550aa859290f3eae331cb7489de1 Mon Sep 17 00:00:00 2001 From: Vitaliy Guschin Date: Thu, 28 Mar 2024 19:06:03 +0300 Subject: [PATCH] Refactor 'parallel' package. Signed-off-by: Vitaliy Guschin --- go.mod | 2 +- go.sum | 4 ++-- test/calico-vpp/main_test.go | 10 +++++++++- test/default/feature_test.go | 12 +++++++++++- 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index a369f72..d46cfd8 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/networkservicemesh/integration-k8s-packet go 1.20 require ( - github.com/networkservicemesh/integration-tests v0.0.0-20240307141021-83f3cb0a8719 + github.com/networkservicemesh/integration-tests v0.0.0-20240328125113-c4e9473ac173 github.com/stretchr/testify v1.8.4 ) diff --git a/go.sum b/go.sum index 603bfc6..9302930 100644 --- a/go.sum +++ b/go.sum @@ -14,8 +14,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/networkservicemesh/gotestmd v0.0.0-20220628095933-eabbdc09e0dc h1:1L/OisEFsOyhwaqeJpYmM1nlJ2dBusUMiszPDBlUip0= github.com/networkservicemesh/gotestmd v0.0.0-20220628095933-eabbdc09e0dc/go.mod h1:8EWnekTRNX+NxBdTFE24WqUoM7SgJHbiafDBrIIdOmQ= -github.com/networkservicemesh/integration-tests v0.0.0-20240307141021-83f3cb0a8719 h1:0TlXNQ7skuAE0QtSgmIfwEO2FCOkvLk7maSJvlxhn94= -github.com/networkservicemesh/integration-tests v0.0.0-20240307141021-83f3cb0a8719/go.mod h1:WLpOEldvahZQkJSdU3kspIS4tB1x1hDnWP08B/nCTjM= +github.com/networkservicemesh/integration-tests v0.0.0-20240328125113-c4e9473ac173 h1:QQglbOmjw/Eh46jd6miAf4M4uFO58bE22xKT3luI7x8= +github.com/networkservicemesh/integration-tests v0.0.0-20240328125113-c4e9473ac173/go.mod h1:cT5l2gQd8TEjjgoxLEEF9oR2DB4AH/KlLQEeNvba4U4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= diff --git a/test/calico-vpp/main_test.go b/test/calico-vpp/main_test.go index 4606493..637f9c9 100644 --- a/test/calico-vpp/main_test.go +++ b/test/calico-vpp/main_test.go @@ -2,6 +2,8 @@ // // Copyright (c) 2023-2024 Cisco and/or its affiliates. // +// Copyright (c) 2024 Pragmagic Inc. and/or its affiliates. +// // SPDX-License-Identifier: Apache-2.0 // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -65,5 +67,11 @@ func (s *featuresSuite) BeforeTest(suiteName, testName string) { } func TestRunFeatureSuiteCalico(t *testing.T) { - parallel.Run(t, new(featuresSuite), "TestVl3_basic", "TestVl3_dns", "TestScale_from_zero", "TestVl3_scale_from_zero", "TestSelect_forwarder") + featSuite := new(featuresSuite) + parallel.Run(t, featSuite, + parallel.WithRunningTestsSynchronously( + featSuite.TestVl3_dns, + featSuite.TestVl3_scale_from_zero, + featSuite.TestScale_from_zero, + featSuite.TestSelect_forwarder)) } diff --git a/test/default/feature_test.go b/test/default/feature_test.go index 1b3bda9..fe7c28d 100644 --- a/test/default/feature_test.go +++ b/test/default/feature_test.go @@ -1,5 +1,7 @@ // Copyright (c) 2024 Cisco and/or its affiliates. // +// Copyright (c) 2024 Pragmagic Inc. and/or its affiliates. +// // SPDX-License-Identifier: Apache-2.0 // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,5 +26,13 @@ import ( ) func TestFeatureSuite(t *testing.T) { - parallel.Run(t, new(features.Suite), "TestVl3_ipv6", "TestVl3_dns", "TestVl3_lb", "TestVl3_scale_from_zero", "TestScale_from_zero", "TestSelect_forwarder") + featuresSuite := new(features.Suite) + parallel.Run(t, featuresSuite, + parallel.WithRunningTestsSynchronously( + featuresSuite.TestVl3_ipv6, + featuresSuite.TestVl3_dns, + featuresSuite.TestVl3_lb, + featuresSuite.TestVl3_scale_from_zero, + featuresSuite.TestScale_from_zero, + featuresSuite.TestSelect_forwarder)) }