Skip to content

Commit

Permalink
FIXUP
Browse files Browse the repository at this point in the history
  • Loading branch information
whatyouhide committed Oct 13, 2023
1 parent c83bc0f commit d458a14
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 9 additions & 1 deletion test/xandra/cluster_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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",

Check failure on line 148 in test/xandra/cluster_test.exs

View workflow job for this annotation

GitHub Actions / Test (Elixir 1.15.4, OTP 25.3, C* 4.1, Scylla 5.1.6, Native protocol v3)

test start_link/1 doesn't fail to start if the control connection fails to connect (Xandra.ClusterTest)

Check failure on line 148 in test/xandra/cluster_test.exs

View workflow job for this annotation

GitHub Actions / Test (Elixir 1.15.4, OTP 25.3, C* 4.1, Scylla 5.1.6, Native protocol v4)

test start_link/1 doesn't fail to start if the control connection fails to connect (Xandra.ClusterTest)

Check failure on line 148 in test/xandra/cluster_test.exs

View workflow job for this annotation

GitHub Actions / Test (Elixir 1.15.4, OTP 25.3, C* 3, Scylla 4.6.3, Native protocol v3)

test start_link/1 doesn't fail to start if the control connection fails to connect (Xandra.ClusterTest)

Check failure on line 148 in test/xandra/cluster_test.exs

View workflow job for this annotation

GitHub Actions / Test (Elixir 1.15.4, OTP 25.3, C* 3, Scylla 4.6.3, Native protocol v4)

test start_link/1 doesn't fail to start if the control connection fails to connect (Xandra.ClusterTest)

Check failure on line 148 in test/xandra/cluster_test.exs

View workflow job for this annotation

GitHub Actions / Test (Elixir 1.15.4, OTP 25.3, C* , Scylla , Native protocol v5)

test start_link/1 doesn't fail to start if the control connection fails to connect (Xandra.ClusterTest)
%{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

Expand Down
2 changes: 1 addition & 1 deletion test/xandra_toxiproxy_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit d458a14

Please sign in to comment.