func (at *allocatorTest) RunAndCleanup(ctx context.Context, t *testing.T) { s := log.Scope(t, "AllocatorTest-"+at.Prefix) defer s.Close(t) defer at.Cleanup(t) at.Run(ctx, t) }
// TestGossipRestart verifies that the gossip network can be // re-bootstrapped after a time when all nodes were down // simultaneously. func TestGossipRestart(t *testing.T) { s := log.Scope(t, "") defer s.Close(t) // TODO(bram): #4559 Limit this test to only the relevant cases. No chaos // agents should be required. runTestOnConfigs(t, testGossipRestartInner) }
func TestDockerPHP(t *testing.T) { s := log.Scope(t, "") defer s.Close(t) ctx := context.Background() testDockerSuccess(ctx, t, "php", []string{"php", "-r", strings.Replace(php, "%v", "3", 1)}) testDockerFail(ctx, t, "php", []string{"php", "-r", strings.Replace(php, "%v", `"a"`, 1)}) }
func TestDockerJava(t *testing.T) { s := log.Scope(t, "") defer s.Close(t) ctx := context.Background() testDockerSuccess(ctx, t, "java", []string{"/bin/sh", "-c", strings.Replace(java, "%v", "Int(2, 3)", 1)}) testDockerFail(ctx, t, "java", []string{"/bin/sh", "-c", strings.Replace(java, "%v", `String(2, "a")`, 1)}) }
// RepairTest kills and starts new nodes systematically to ensure we do // indeed repair the cluster. func TestRepair(t *testing.T) { t.Skip("TODO(bram): skip this test until failures are investigated - #6798, #6700, #6277, #6209, #5672") s := log.Scope(t, "") defer s.Close(t) runTestOnConfigs(t, testRepairInner) }
// This runs the `finagle-postgres` tests from the upstream project. func TestDockerFinagle(t *testing.T) { ctx := context.Background() t.Skip("#8332. Upstream has a 2s timeout, disabled until we run tests somewhere more consistent.") s := log.Scope(t, "") defer s.Close(t) testDockerSuccess(ctx, t, "finagle", []string{"/bin/sh", "-c", finagle}) }
// TestStatusServer starts up an N node cluster and tests the status server on // each node. func TestStatusServer(t *testing.T) { s := log.Scope(t, "") defer s.Close(t) runTestOnConfigs(t, testStatusServerInner) }
func TestGossipPeerings(t *testing.T) { s := log.Scope(t, "") defer s.Close(t) runTestOnConfigs(t, testGossipPeeringsInner) }
// TestMonotonicInserts replicates the 'monotonic' test from the Jepsen // CockroachDB test suite (https://github.com/cockroachdb/jepsen). func TestMonotonicInserts(t *testing.T) { s := log.Scope(t, "") defer s.Close(t) runTestOnConfigs(t, testMonotonicInsertsInner) }
func TestAdminLossOfQuorum(t *testing.T) { s := log.Scope(t, "") defer s.Close(t) runTestOnConfigs(t, testAdminLossOfQuorumInner) }