diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0c35bdd3..c546a357 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -161,11 +161,11 @@ jobs: # TODO: eventually figure out why we can't run encryption tests on CI. - name: Run tests for Cassandra and Scylla if: ${{ !matrix.test_only_cassandra }} - run: mix test.all --trace --exclude encryption --exclude ccm --only tmp + run: mix test.all --trace --exclude encryption --exclude ccm --exclude toxiproxy - name: Run tests for Cassandra only if: ${{ matrix.test_only_cassandra }} - run: mix test --trace --exclude encryption --exclude ccm + run: mix test --trace --exclude encryption --exclude ccm --exclude toxiproxy - name: Dump Docker logs on failure uses: jwalton/gh-docker-logs@v1 diff --git a/test/xandra/cluster_test.exs b/test/xandra/cluster_test.exs index ae75e403..7a1101b2 100644 --- a/test/xandra/cluster_test.exs +++ b/test/xandra/cluster_test.exs @@ -144,9 +144,17 @@ defmodule Xandra.ClusterTest do end describe "start_link/1" do - test "doesn't fail to start if the control connection fails to connect", %{base_options: opts} do + @tag telemetry_events: [[:xandra, :cluster, :control_connection, :failed_to_connect]] + test "doesn't fail to start if the control connection fails to connect", + %{base_options: opts, telemetry_ref: telemetry_ref} do opts = Keyword.merge(opts, nodes: ["127.0.0.1:8092"], sync_connect: false) pid = start_link_supervised!({Cluster, opts}) + + assert_telemetry [:control_connection, :failed_to_connect], %{ + cluster_pid: ^pid, + reason: :econnrefused + } + :sys.get_state(pid) end diff --git a/test/xandra_toxiproxy_test.exs b/test/xandra_toxiproxy_test.exs index cfd9e233..ff9dee5f 100644 --- a/test/xandra_toxiproxy_test.exs +++ b/test/xandra_toxiproxy_test.exs @@ -35,7 +35,7 @@ defmodule XandraToxiproxyTest do conn = start_supervised!({Xandra, opts}) ToxiproxyEx.get!(:xandra_test_cassandra) - |> ToxiproxyEx.toxic(:limit_data, bytes: 120) + |> ToxiproxyEx.toxic(:limit_data, bytes: 500) |> ToxiproxyEx.apply!(fn -> assert {:error, %ConnectionError{reason: :disconnected}} = Xandra.prepare(conn, "SELECT * FROM system.local")