From 744f90b969c9b2fec0238e9b3e0213a17c1bb91d Mon Sep 17 00:00:00 2001 From: George Pollard Date: Mon, 12 Jul 2021 10:22:27 +1200 Subject: [PATCH] Add tparallel linter and fix (#1638) --- .golangci.yml | 1 + hack/generated/pkg/duration/duration_test.go | 2 ++ hack/generator/pkg/astbuilder/literals_test.go | 5 ++++- hack/generator/pkg/astmodel/array_type_test.go | 2 ++ hack/generator/pkg/astmodel/enum_type_test.go | 1 + .../astmodel/external_package_reference_test.go | 7 +++++++ hack/generator/pkg/astmodel/flagged_type_test.go | 4 ++++ .../pkg/astmodel/identifier_factory_test.go | 8 ++++++++ .../pkg/astmodel/local_package_reference_test.go | 6 ++++++ hack/generator/pkg/astmodel/map_type_test.go | 1 + hack/generator/pkg/astmodel/meta_type_test.go | 14 +++++++------- hack/generator/pkg/astmodel/object_type_test.go | 1 + .../pkg/astmodel/package_import_set_test.go | 6 +++++- hack/generator/pkg/astmodel/package_import_test.go | 4 ++++ .../pkg/astmodel/package_reference_test.go | 4 ++++ hack/generator/pkg/astmodel/primitive_type_test.go | 2 ++ .../pkg/astmodel/property_definition_test.go | 6 ++++++ .../pkg/astmodel/storage_package_reference_test.go | 5 +++++ hack/generator/pkg/astmodel/type_flag_test.go | 2 ++ hack/generator/pkg/astmodel/type_name_test.go | 4 ++++ hack/generator/pkg/astmodel/type_test.go | 1 + hack/generator/pkg/astmodel/type_visitor_test.go | 6 +++++- .../codegen/pipeline/status_from_swagger_test.go | 2 ++ .../pkg/config/create_globbing_regex_test.go | 2 ++ .../functions/property_assignment_function_test.go | 3 ++- 25 files changed, 88 insertions(+), 11 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 065c010d804..fe8705fb60d 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -6,6 +6,7 @@ linters: enable: - gofmt - megacheck + - tparallel presets: - bugs - unused diff --git a/hack/generated/pkg/duration/duration_test.go b/hack/generated/pkg/duration/duration_test.go index 7b7089eec1a..41a087e8c8a 100644 --- a/hack/generated/pkg/duration/duration_test.go +++ b/hack/generated/pkg/duration/duration_test.go @@ -62,6 +62,8 @@ func TestDuration_String(t *testing.T) { } func TestDuration_JSON(t *testing.T) { + t.Parallel() + cases := []struct { Name string JSON string diff --git a/hack/generator/pkg/astbuilder/literals_test.go b/hack/generator/pkg/astbuilder/literals_test.go index 97120f6d63f..fceb3d23a0d 100644 --- a/hack/generator/pkg/astbuilder/literals_test.go +++ b/hack/generator/pkg/astbuilder/literals_test.go @@ -6,11 +6,14 @@ package astbuilder import ( - . "github.com/onsi/gomega" "testing" + + . "github.com/onsi/gomega" ) func Test_LiteralString(t *testing.T) { + t.Parallel() + cases := []struct { name string original string diff --git a/hack/generator/pkg/astmodel/array_type_test.go b/hack/generator/pkg/astmodel/array_type_test.go index d6cc6eb5a89..eeca02f3655 100644 --- a/hack/generator/pkg/astmodel/array_type_test.go +++ b/hack/generator/pkg/astmodel/array_type_test.go @@ -12,6 +12,8 @@ import ( ) func TestArrayType_Equals_WhenGivenType_ReturnsExpectedResult(t *testing.T) { + t.Parallel() + strArray := NewArrayType(StringType) intArray := NewArrayType(IntType) otherStrArray := NewArrayType(StringType) diff --git a/hack/generator/pkg/astmodel/enum_type_test.go b/hack/generator/pkg/astmodel/enum_type_test.go index be66acffd8c..67b63fc1293 100644 --- a/hack/generator/pkg/astmodel/enum_type_test.go +++ b/hack/generator/pkg/astmodel/enum_type_test.go @@ -61,6 +61,7 @@ func Test_EnumTypeBaseType_AfterConstruction_ReturnsExpectedType(t *testing.T) { */ func Test_EnumTypeEquals_GivenEnums_ReturnsExpectedResult(t *testing.T) { + t.Parallel() enum := NewEnumType(StringType, aboveValue, underValue) diff --git a/hack/generator/pkg/astmodel/external_package_reference_test.go b/hack/generator/pkg/astmodel/external_package_reference_test.go index 856426bc8d3..bce351cabbb 100644 --- a/hack/generator/pkg/astmodel/external_package_reference_test.go +++ b/hack/generator/pkg/astmodel/external_package_reference_test.go @@ -12,6 +12,8 @@ import ( ) func TestMakeExternalPackageReference_GivenPath_ReturnsInstanceWithPath(t *testing.T) { + t.Parallel() + cases := []struct { name string path string @@ -32,6 +34,8 @@ func TestMakeExternalPackageReference_GivenPath_ReturnsInstanceWithPath(t *testi } func TestExternalPackageReferences_ReturnExpectedProperties(t *testing.T) { + t.Parallel() + cases := []struct { name string path string @@ -58,6 +62,7 @@ func TestExternalPackageReferences_ReturnExpectedProperties(t *testing.T) { } func TestExternalPackageReferences_Equals_GivesExpectedResults(t *testing.T) { + t.Parallel() fmtRef := MakeExternalPackageReference("fmt") astRef := MakeExternalPackageReference("go/ast") @@ -90,6 +95,8 @@ func TestExternalPackageReferences_Equals_GivesExpectedResults(t *testing.T) { } func TestExternalPackageReferenceIsPreview(t *testing.T) { + t.Parallel() + fmtRef := MakeExternalPackageReference("fmt") astRef := MakeExternalPackageReference("go/ast") otherRef := makeTestLocalPackageReference("group", "package") diff --git a/hack/generator/pkg/astmodel/flagged_type_test.go b/hack/generator/pkg/astmodel/flagged_type_test.go index 13f1c2a4f8f..7a8ab79406c 100644 --- a/hack/generator/pkg/astmodel/flagged_type_test.go +++ b/hack/generator/pkg/astmodel/flagged_type_test.go @@ -79,6 +79,8 @@ func TestFlaggedType_WithoutFlag_GivenUnusedFlag_ReturnsSameInstance(t *testing. */ func TestFlaggedType_Equals_GivenOther_HasExpectedResult(t *testing.T) { + t.Parallel() + armString := NewFlaggedType(StringType, ARMFlag) armInt := NewFlaggedType(IntType, ARMFlag) storageString := NewFlaggedType(StringType, StorageFlag) @@ -120,6 +122,8 @@ func TestFlaggedType_Equals_GivenOther_HasExpectedResult(t *testing.T) { */ func TestFlaggedType_String_GivenTypeAndTag_ReturnsExpectedString(t *testing.T) { + t.Parallel() + flaggedString := NewFlaggedType(StringType, OneOfFlag) cases := []struct { name string diff --git a/hack/generator/pkg/astmodel/identifier_factory_test.go b/hack/generator/pkg/astmodel/identifier_factory_test.go index 42c0fb78d3d..28659fbafe2 100644 --- a/hack/generator/pkg/astmodel/identifier_factory_test.go +++ b/hack/generator/pkg/astmodel/identifier_factory_test.go @@ -12,6 +12,8 @@ import ( ) func Test_CreateIdentifier_GivenName_ReturnsExpectedIdentifier(t *testing.T) { + t.Parallel() + cases := []struct { name string visibility Visibility @@ -58,6 +60,8 @@ func Test_CreateIdentifier_GivenName_ReturnsExpectedIdentifier(t *testing.T) { } func Test_SliceIntoWords_GivenIdentifier_ReturnsExpectedSlice(t *testing.T) { + t.Parallel() + cases := []struct { identifier string expected []string @@ -89,6 +93,8 @@ func Test_SliceIntoWords_GivenIdentifier_ReturnsExpectedSlice(t *testing.T) { } func Test_TransformToSnakeCase_ReturnsExpectedString(t *testing.T) { + t.Parallel() + cases := []struct { string string expected string @@ -120,6 +126,8 @@ func Test_TransformToSnakeCase_ReturnsExpectedString(t *testing.T) { } func Test_SimplifyIdentifier_GivenContextAndName_ReturnsExpectedResult(t *testing.T) { + t.Parallel() + cases := []struct { context string identifier string diff --git a/hack/generator/pkg/astmodel/local_package_reference_test.go b/hack/generator/pkg/astmodel/local_package_reference_test.go index dd1d00d6e09..2f9304f80c3 100644 --- a/hack/generator/pkg/astmodel/local_package_reference_test.go +++ b/hack/generator/pkg/astmodel/local_package_reference_test.go @@ -16,6 +16,8 @@ func makeTestLocalPackageReference(group string, version string) LocalPackageRef } func TestMakeLocalPackageReference_GivenGroupAndPackage_ReturnsInstanceWithProperties(t *testing.T) { + t.Parallel() + cases := []struct { name string group string @@ -42,6 +44,8 @@ func TestMakeLocalPackageReference_GivenGroupAndPackage_ReturnsInstanceWithPrope } func TestLocalPackageReferences_ReturnExpectedProperties(t *testing.T) { + t.Parallel() + cases := []struct { name string group string @@ -87,6 +91,7 @@ func TestLocalPackageReferences_ReturnExpectedProperties(t *testing.T) { } func TestLocalPackageReferences_Equals_GivesExpectedResults(t *testing.T) { + t.Parallel() batchRef := makeTestLocalPackageReference("microsoft.batch", "v20200901") olderRef := makeTestLocalPackageReference("microsoft.batch", "v20150101") @@ -122,6 +127,7 @@ func TestLocalPackageReferences_Equals_GivesExpectedResults(t *testing.T) { } func TestLocalPackageReferenceIsPreview(t *testing.T) { + t.Parallel() cases := []struct { name string diff --git a/hack/generator/pkg/astmodel/map_type_test.go b/hack/generator/pkg/astmodel/map_type_test.go index d35480b57f6..a9a8c4b094d 100644 --- a/hack/generator/pkg/astmodel/map_type_test.go +++ b/hack/generator/pkg/astmodel/map_type_test.go @@ -12,6 +12,7 @@ import ( ) func TestMapType_Equals_WhenGivenType_ReturnsExpectedResult(t *testing.T) { + t.Parallel() strToStr := NewMapType(StringType, StringType) strToBool := NewMapType(StringType, BoolType) diff --git a/hack/generator/pkg/astmodel/meta_type_test.go b/hack/generator/pkg/astmodel/meta_type_test.go index 396f070ad18..43806bdbc8e 100644 --- a/hack/generator/pkg/astmodel/meta_type_test.go +++ b/hack/generator/pkg/astmodel/meta_type_test.go @@ -12,6 +12,7 @@ import ( ) func TestAsPrimitiveType(t *testing.T) { + t.Parallel() objectType := NewObjectType() arrayType := NewArrayType(StringType) @@ -56,12 +57,12 @@ func TestAsPrimitiveType(t *testing.T) { g.Expect(actual).To(Equal(c.expected)) g.Expect(ok).To(BeTrue()) } - }) } } func TestAsObjectType(t *testing.T) { + t.Parallel() objectType := NewObjectType() arrayType := NewArrayType(StringType) @@ -106,12 +107,12 @@ func TestAsObjectType(t *testing.T) { g.Expect(actual).To(Equal(c.expected)) g.Expect(ok).To(BeTrue()) } - }) } } func TestAsArrayType(t *testing.T) { + t.Parallel() objectType := NewObjectType() arrayType := NewArrayType(StringType) @@ -156,12 +157,12 @@ func TestAsArrayType(t *testing.T) { g.Expect(actual).To(Equal(c.expected)) g.Expect(ok).To(BeTrue()) } - }) } } func TestAsMapType(t *testing.T) { + t.Parallel() objectType := NewObjectType() arrayType := NewArrayType(StringType) @@ -206,12 +207,12 @@ func TestAsMapType(t *testing.T) { g.Expect(actual).To(Equal(c.expected)) g.Expect(ok).To(BeTrue()) } - }) } } func TestAsOptionalType(t *testing.T) { + t.Parallel() objectType := NewObjectType() arrayType := NewArrayType(StringType) @@ -254,12 +255,12 @@ func TestAsOptionalType(t *testing.T) { g.Expect(actual).To(Equal(c.expected)) g.Expect(ok).To(BeTrue()) } - }) } } func TestAsEnumType(t *testing.T) { + t.Parallel() objectType := NewObjectType() arrayType := NewArrayType(StringType) @@ -302,12 +303,12 @@ func TestAsEnumType(t *testing.T) { g.Expect(actual).To(Equal(c.expected)) g.Expect(ok).To(BeTrue()) } - }) } } func TestAsTypeName(t *testing.T) { + t.Parallel() objectType := NewObjectType() arrayType := NewArrayType(StringType) @@ -350,7 +351,6 @@ func TestAsTypeName(t *testing.T) { g.Expect(actual).To(Equal(c.expected)) g.Expect(ok).To(BeTrue()) } - }) } } diff --git a/hack/generator/pkg/astmodel/object_type_test.go b/hack/generator/pkg/astmodel/object_type_test.go index 218f5b4831f..a562ed404ba 100644 --- a/hack/generator/pkg/astmodel/object_type_test.go +++ b/hack/generator/pkg/astmodel/object_type_test.go @@ -84,6 +84,7 @@ func Test_EmbeddedProperties_GivenObjectWithProperties_ReturnsExpectedSortedSlic */ func TestObjectType_Equals_WhenGivenType_ReturnsExpectedResult(t *testing.T) { + t.Parallel() clanName := NewStringPropertyDefinition("Clan") testcaseA := NewFakeTestCase("testcaseA") diff --git a/hack/generator/pkg/astmodel/package_import_set_test.go b/hack/generator/pkg/astmodel/package_import_set_test.go index d01ffe008b4..7450dc971dd 100644 --- a/hack/generator/pkg/astmodel/package_import_set_test.go +++ b/hack/generator/pkg/astmodel/package_import_set_test.go @@ -197,6 +197,7 @@ func TestRemove_WhenItemNotInSet_LeavesSetWithoutIt(t *testing.T) { */ func TestByNameInGroups_AppliesExpectedOrdering(t *testing.T) { + t.Parallel() fmtRef := MakeExternalPackageReference("fmt") testingRef := MakeExternalPackageReference("testing") @@ -265,6 +266,7 @@ func TestPackageImportSet_ResolveConflicts_GivenExplicitlyNamedConflicts_Returns } func TestPackageImportSet_ResolveConflicts_GivenImplicityNamedConflicts_AssignsExpectedNames(t *testing.T) { + t.Parallel() createSet := func(refs ...PackageReference) *PackageImportSet { result := NewPackageImportSet() @@ -303,7 +305,8 @@ func TestPackageImportSet_ResolveConflicts_GivenImplicityNamedConflicts_AssignsE "Import conflicts with versioned resolution (ii)", createSet(emailTestRef, networkTestRef, emailTestAltRef, networkTestAltRef), networkTestRef, - "networkv20180801"}, + "networkv20180801", + }, { "Import conflicts with versioned resolution (iii)", createSet(emailTestRef, networkTestRef, emailTestAltRef, networkTestAltRef), @@ -339,6 +342,7 @@ func TestPackageImportSet_ResolveConflicts_GivenImplicityNamedConflicts_AssignsE */ func Test_PackageSet_OrderImports(t *testing.T) { + t.Parallel() alphaRef := MakeExternalPackageReference("alpha") betaRef := MakeExternalPackageReference("beta") diff --git a/hack/generator/pkg/astmodel/package_import_test.go b/hack/generator/pkg/astmodel/package_import_test.go index f6df38f9a48..c76aaab7d6c 100644 --- a/hack/generator/pkg/astmodel/package_import_test.go +++ b/hack/generator/pkg/astmodel/package_import_test.go @@ -71,6 +71,8 @@ func Test_PackageImportWithName_GivenExistingName_ReturnsEqualInstance(t *testin */ func TestPackageImport_Equals(t *testing.T) { + t.Parallel() + var zeroPkgRef PackageImport localPkgRef := makeTestLocalPackageReference("group", "ver") localPkgImport := NewPackageImport(localPkgRef) @@ -107,6 +109,8 @@ func TestPackageImport_Equals(t *testing.T) { */ func TestPackageImport_ServiceNameForImport_GivenImport_ReturnsExpectedName(t *testing.T) { + t.Parallel() + cases := []struct { name string ref PackageReference diff --git a/hack/generator/pkg/astmodel/package_reference_test.go b/hack/generator/pkg/astmodel/package_reference_test.go index 84ad1d71518..8a8e363dc54 100644 --- a/hack/generator/pkg/astmodel/package_reference_test.go +++ b/hack/generator/pkg/astmodel/package_reference_test.go @@ -29,6 +29,8 @@ func TestSortPackageReferencesByPathAndVersion(t *testing.T) { } func TestComparePackageReferencesByPathAndVersion(t *testing.T) { + t.Parallel() + cases := []struct { name string left string @@ -74,6 +76,8 @@ func TestComparePackageReferencesByPathAndVersion(t *testing.T) { } func TestVersionComparerCompareNumeric(t *testing.T) { + t.Parallel() + cases := []struct { name string left string diff --git a/hack/generator/pkg/astmodel/primitive_type_test.go b/hack/generator/pkg/astmodel/primitive_type_test.go index bf5464e7629..37ae055ca77 100644 --- a/hack/generator/pkg/astmodel/primitive_type_test.go +++ b/hack/generator/pkg/astmodel/primitive_type_test.go @@ -12,6 +12,8 @@ import ( ) func TestPrimitiveType_Equals_WhenGivenType_ReturnsExpectedResult(t *testing.T) { + t.Parallel() + otherType := NewArrayType(IntType) cases := []struct { diff --git a/hack/generator/pkg/astmodel/property_definition_test.go b/hack/generator/pkg/astmodel/property_definition_test.go index 18e657776f1..b04e5e59f7f 100644 --- a/hack/generator/pkg/astmodel/property_definition_test.go +++ b/hack/generator/pkg/astmodel/property_definition_test.go @@ -334,6 +334,8 @@ func Test_PropertyDefinitionMakeRequired_WhenTypeOptionalAndIsRequired_ReturnsNe } func Test_PropertyDefinitionMakeRequired_PropertyTypeArrayAndMap(t *testing.T) { + t.Parallel() + cases := []struct { name string propertyType Type @@ -402,6 +404,8 @@ func Test_PropertyDefinitionMakeOptional_WhenTypeMandatoryAndIsRequiredFalse_Ret } func Test_PropertyDefinitionMakeOptional_PropertyTypeArrayAndMap(t *testing.T) { + t.Parallel() + cases := []struct { name string propertyType Type @@ -474,6 +478,8 @@ func Test_PropertyDefinition_WithValidation_ReturnsNewPropertyDefinition(t *test */ func TestPropertyDefinition_Equals_WhenGivenPropertyDefinition_ReturnsExpectedResult(t *testing.T) { + t.Parallel() + strProperty := createStringProperty("FullName", "Full Legal Name") otherStrProperty := createStringProperty("FullName", "Full Legal Name") diff --git a/hack/generator/pkg/astmodel/storage_package_reference_test.go b/hack/generator/pkg/astmodel/storage_package_reference_test.go index 2433024fef6..198166c62f5 100644 --- a/hack/generator/pkg/astmodel/storage_package_reference_test.go +++ b/hack/generator/pkg/astmodel/storage_package_reference_test.go @@ -12,6 +12,7 @@ import ( ) func TestMakeStoragePackageReference(t *testing.T) { + t.Parallel() cases := []struct { group string @@ -37,6 +38,8 @@ func TestMakeStoragePackageReference(t *testing.T) { } func TestStoragePackageReferenceEquals(t *testing.T) { + t.Parallel() + localRef := makeTestLocalPackageReference("group", "v1") storageRef := MakeStoragePackageReference(localRef) otherRef := MakeStoragePackageReference(localRef) @@ -67,6 +70,8 @@ func TestStoragePackageReferenceEquals(t *testing.T) { } func TestStoragePackageReferenceIsPreview(t *testing.T) { + t.Parallel() + cases := []struct { name string version string diff --git a/hack/generator/pkg/astmodel/type_flag_test.go b/hack/generator/pkg/astmodel/type_flag_test.go index 4efa4693a57..3c2f001df8f 100644 --- a/hack/generator/pkg/astmodel/type_flag_test.go +++ b/hack/generator/pkg/astmodel/type_flag_test.go @@ -27,6 +27,7 @@ func TestTypeFlag_Wrap_GivenType_ReturnsWrappedType(t *testing.T) { */ func TestTypeFlag_IsOn_GivenType_ReturnsExpectedValue(t *testing.T) { + t.Parallel() armString := ARMFlag.ApplyTo(StringType) @@ -57,6 +58,7 @@ func TestTypeFlag_IsOn_GivenType_ReturnsExpectedValue(t *testing.T) { */ func TestTypeFlag_RemoveFrom_ReturnsExpectedValue(t *testing.T) { + t.Parallel() armString := ARMFlag.ApplyTo(StringType) armStorageString := StorageFlag.ApplyTo(armString) diff --git a/hack/generator/pkg/astmodel/type_name_test.go b/hack/generator/pkg/astmodel/type_name_test.go index bbf75d24261..8a90505de2d 100644 --- a/hack/generator/pkg/astmodel/type_name_test.go +++ b/hack/generator/pkg/astmodel/type_name_test.go @@ -12,6 +12,8 @@ import ( ) func TestSingular_GivesExpectedResults(t *testing.T) { + t.Parallel() + cases := []struct { name string expected string @@ -43,6 +45,8 @@ func TestSingular_GivesExpectedResults(t *testing.T) { } func TestPlural_GivesExpectedResults(t *testing.T) { + t.Parallel() + cases := []struct { name string expected string diff --git a/hack/generator/pkg/astmodel/type_test.go b/hack/generator/pkg/astmodel/type_test.go index 05681cfc0a5..6e7ea50dc55 100644 --- a/hack/generator/pkg/astmodel/type_test.go +++ b/hack/generator/pkg/astmodel/type_test.go @@ -13,6 +13,7 @@ import ( ) func TestWriteDebugDescription(t *testing.T) { + t.Parallel() here := MakeLocalPackageReference("local", "test", "v1") diff --git a/hack/generator/pkg/astmodel/type_visitor_test.go b/hack/generator/pkg/astmodel/type_visitor_test.go index 885a295f13e..ca58807188b 100644 --- a/hack/generator/pkg/astmodel/type_visitor_test.go +++ b/hack/generator/pkg/astmodel/type_visitor_test.go @@ -6,13 +6,15 @@ package astmodel import ( - "github.com/pkg/errors" "testing" + "github.com/pkg/errors" + . "github.com/onsi/gomega" ) func Test_Visit_GivenCountingTypeVisitor_ReturnsExpectedCounts(t *testing.T) { + t.Parallel() arrType := NewArrayType(StringType) mapType := NewMapType(StringType, StringType) @@ -123,6 +125,7 @@ func MakeCountingTypeVisitor() *CountingTypeVisitor { } func TestIdentityVisitorReturnsEqualResult(t *testing.T) { + t.Parallel() mapOfStringToString := NewMapType(StringType, StringType) mapOfStringToBool := NewMapType(StringType, BoolType) @@ -177,6 +180,7 @@ func TestIdentityVisitorReturnsEqualResult(t *testing.T) { } func TestMakeTypeVisitorWithInjectedFunctions(t *testing.T) { + t.Parallel() cases := []struct { name string diff --git a/hack/generator/pkg/codegen/pipeline/status_from_swagger_test.go b/hack/generator/pkg/codegen/pipeline/status_from_swagger_test.go index 26294004010..90632d3c010 100644 --- a/hack/generator/pkg/codegen/pipeline/status_from_swagger_test.go +++ b/hack/generator/pkg/codegen/pipeline/status_from_swagger_test.go @@ -13,6 +13,8 @@ import ( ) func Test_ShouldSkipDir_GivenPath_HasExpectedResult(t *testing.T) { + t.Parallel() + linuxCases := []struct { name string path string diff --git a/hack/generator/pkg/config/create_globbing_regex_test.go b/hack/generator/pkg/config/create_globbing_regex_test.go index 87996b0b87a..65685f32e58 100644 --- a/hack/generator/pkg/config/create_globbing_regex_test.go +++ b/hack/generator/pkg/config/create_globbing_regex_test.go @@ -12,6 +12,7 @@ import ( ) func Test_CreateGlobbingRegex_ReturnsExpectedRegex(t *testing.T) { + t.Parallel() cases := []struct { glob string @@ -36,6 +37,7 @@ func Test_CreateGlobbingRegex_ReturnsExpectedRegex(t *testing.T) { } func Test_GlobbingRegex_MatchesExpectedStrings(t *testing.T) { + t.Parallel() cases := []struct { regex string diff --git a/hack/generator/pkg/functions/property_assignment_function_test.go b/hack/generator/pkg/functions/property_assignment_function_test.go index f0b308bcdcb..80ed9726897 100644 --- a/hack/generator/pkg/functions/property_assignment_function_test.go +++ b/hack/generator/pkg/functions/property_assignment_function_test.go @@ -23,7 +23,6 @@ type StorageConversionPropertyTestCase struct { } func CreatePropertyAssignmentFunctionTestCases() []*StorageConversionPropertyTestCase { - // Package References vCurrent := test.MakeLocalPackageReference("Verification", "vCurrent") vNext := test.MakeLocalPackageReference("Verification", "vNext") @@ -207,6 +206,8 @@ func CreatePropertyAssignmentFunctionTestCases() []*StorageConversionPropertyTes } func TestPropertyAssignmentFunction_AsFunc(t *testing.T) { + t.Parallel() + for _, c := range CreatePropertyAssignmentFunctionTestCases() { c := c t.Run(c.name, func(t *testing.T) {