Exemplo n.º 1
0
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)
}
Exemplo n.º 2
0
// 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)
}
Exemplo n.º 3
0
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)})
}
Exemplo n.º 4
0
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)})
}
Exemplo n.º 5
0
// 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)
}
Exemplo n.º 6
0
// 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})
}
Exemplo n.º 7
0
// 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)
}
Exemplo n.º 8
0
func TestGossipPeerings(t *testing.T) {
	s := log.Scope(t, "")
	defer s.Close(t)

	runTestOnConfigs(t, testGossipPeeringsInner)
}
Exemplo n.º 9
0
// 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)
}
Exemplo n.º 10
0
func TestAdminLossOfQuorum(t *testing.T) {
	s := log.Scope(t, "")
	defer s.Close(t)

	runTestOnConfigs(t, testAdminLossOfQuorumInner)
}