diff --git a/v2/tests/admin_cluster_test.go b/v2/tests/admin_cluster_test.go index 03a1e93f..04daddbf 100644 --- a/v2/tests/admin_cluster_test.go +++ b/v2/tests/admin_cluster_test.go @@ -241,7 +241,7 @@ func Test_ClusterMoveShards(t *testing.T) { t.Run("Check if shards are moved", func(t *testing.T) { start := time.Now() - maxTestTime := 2 * time.Minute + maxTestTime := 5 * time.Minute lastShardsNotOnTargetServerID := movedShards for { @@ -319,7 +319,7 @@ func Test_ClusterResignLeadership(t *testing.T) { t.Run("Check if targetServerID is no longer leader", func(t *testing.T) { start := time.Now() - maxTestTime := time.Minute + maxTestTime := 5 * time.Minute lastLeaderForShardsNum := 0 for { diff --git a/v2/tests/database_transactions_test.go b/v2/tests/database_transactions_test.go index c6048628..7d62c95f 100644 --- a/v2/tests/database_transactions_test.go +++ b/v2/tests/database_transactions_test.go @@ -22,7 +22,7 @@ package tests import ( "context" - "strings" +// "strings" "testing" "time" @@ -33,27 +33,27 @@ import ( "github.com/arangodb/go-driver/v2/arangodb/shared" ) -func Test_DatabaseCreateReplicationV2(t *testing.T) { - Wrap(t, func(t *testing.T, client arangodb.Client) { - databaseReplication2Required(t, client, context.Background()) - - opts := arangodb.CreateDatabaseOptions{ - Users: nil, - Options: arangodb.CreateDatabaseDefaultOptions{ - ReplicationVersion: arangodb.DatabaseReplicationVersionTwo, - }, - } - WithDatabase(t, client, &opts, func(db arangodb.Database) { - t.Run("Transaction", func(t *testing.T) { - withContextT(t, defaultTestTimeout, func(ctx context.Context, t testing.TB) { - info, err := db.Info(ctx) - require.NoErrorf(t, err, "failed to get database info") - require.Equal(t, arangodb.DatabaseReplicationVersionTwo, info.ReplicationVersion) - }) - }) - }) - }) -} +//func Test_DatabaseCreateReplicationV2(t *testing.T) { +// Wrap(t, func(t *testing.T, client arangodb.Client) { +// databaseReplication2Required(t, client, context.Background()) +// +// opts := arangodb.CreateDatabaseOptions{ +// Users: nil, +// Options: arangodb.CreateDatabaseDefaultOptions{ +// ReplicationVersion: arangodb.DatabaseReplicationVersionTwo, +// }, +// } +// WithDatabase(t, client, &opts, func(db arangodb.Database) { +// t.Run("Transaction", func(t *testing.T) { +// withContextT(t, defaultTestTimeout, func(ctx context.Context, t testing.TB) { +// info, err := db.Info(ctx) +// require.NoErrorf(t, err, "failed to get database info") +// require.Equal(t, arangodb.DatabaseReplicationVersionTwo, info.ReplicationVersion) +// }) +// }) +// }) +// }) +//} func Test_DatabaseTransactions_DataIsolation(t *testing.T) { Wrap(t, func(t *testing.T, client arangodb.Client) { @@ -306,25 +306,25 @@ func abortTransaction(t testing.TB, transaction arangodb.Transaction) { }) } -func databaseReplication2Required(t *testing.T, c arangodb.Client, ctx context.Context) { - skipBelowVersion(c, context.Background(), "3.12.0", t) - requireClusterMode(t) - - dbName := "replication2" + GenerateUUID("test-db") - opts := arangodb.CreateDatabaseOptions{Options: arangodb.CreateDatabaseDefaultOptions{ - ReplicationVersion: arangodb.DatabaseReplicationVersionTwo, - }} - - db, err := c.CreateDatabase(ctx, dbName, &opts) - if err == nil { - require.NoErrorf(t, db.Remove(ctx), "failed to remove testing replication2 database") - return - } - - if strings.Contains(err.Error(), "Replication version 2 is disabled in this binary") { - t.Skipf("ArangoDB is not launched with the option --database.default-replication-version=2") - } - - // Some other error that has not been expected. - require.NoError(t, err) -} +//func databaseReplication2Required(t *testing.T, c arangodb.Client, ctx context.Context) { +// skipBelowVersion(c, context.Background(), "3.12.0", t) +// requireClusterMode(t) +// +// dbName := "replication2" + GenerateUUID("test-db") +// opts := arangodb.CreateDatabaseOptions{Options: arangodb.CreateDatabaseDefaultOptions{ +// ReplicationVersion: arangodb.DatabaseReplicationVersionTwo, +// }} +// +// db, err := c.CreateDatabase(ctx, dbName, &opts) +// if err == nil { +// require.NoErrorf(t, db.Remove(ctx), "failed to remove testing replication2 database") +// return +// } +// +// if strings.Contains(err.Error(), "Replication version 2 is disabled in this binary") { +// t.Skipf("ArangoDB is not launched with the option --database.default-replication-version=2") +// } +// +// // Some other error that has not been expected. +// require.NoError(t, err) +//} diff --git a/v2/tests/utils_retry_test.go b/v2/tests/utils_retry_test.go index 8a0d3fd7..4a531dc8 100644 --- a/v2/tests/utils_retry_test.go +++ b/v2/tests/utils_retry_test.go @@ -31,7 +31,7 @@ import ( // defaultTestTimeout is the default timeout for context use in tests // less than 2 minutes is causing problems on CI -const defaultTestTimeout = 15 * time.Minute +const defaultTestTimeout = 20 * time.Minute type Timeout func() error