Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
test: bound testcontainer migration subtest concurrency for oracle/mssql (#19545)
p0ny915a4ddd098f
diff --git a/backend/plugin/schema/mssql/generate_migration_testcontainer_test.go b/backend/plugin/schema/mssql/generate_migration_testcontainer_test.goindex 0a893b9a0d..1cf5fe5703 100644--- a/backend/plugin/schema/mssql/generate_migration_testcontainer_test.go+++ b/backend/plugin/schema/mssql/generate_migration_testcontainer_test.go@@ -2346,9 +2346,18 @@ GO},}+ // MSSQL Express in CI gets significantly slower when too many schema-heavy+ // subtests run at once against the same container. Keep bounded parallelism.+ const maxConcurrentSubtests = 4+ parallelGate := make(chan struct{}, maxConcurrentSubtests)+for _, testCase := range testCases {t.Run(testCase.name, func(t *testing.T) {t.Parallel()+ parallelGate <- struct{}{}+ defer func() {+ <-parallelGate+ }()// Create test database with unique nametestDB := fmt.Sprintf("test_%s", strings.ReplaceAll(uuid.New().String(), "-", "_"))diff --git a/backend/plugin/schema/oracle/generate_migration_testcontainer_test.go b/backend/plugin/schema/oracle/generate_migration_testcontainer_test.goindex 52521e7722..600d528787 100644--- a/backend/plugin/schema/oracle/generate_migration_testcontainer_test.go+++ b/backend/plugin/schema/oracle/generate_migration_testcontainer_test.go@@ -1711,10 +1711,19 @@ COMMENT ON TABLE SPECIAL_DATA IS '';},}+ // Oracle Free in CI slows down heavily when too many schema-heavy+ // subtests execute concurrently against the same container.+ const maxConcurrentSubtests = 4+ parallelGate := make(chan struct{}, maxConcurrentSubtests)+for _, tc := range testCases {tc := tc // Capture range variablet.Run(tc.name, func(t *testing.T) {t.Parallel()+ parallelGate <- struct{}{}+ defer func() {+ <-parallelGate+ }()// Create unique Oracle user for this test (Oracle users are schemas)// Use UUID to ensure uniqueness and avoid name collisions