Skip to content

Commit

Permalink
add extra print_registry_contents
Browse files Browse the repository at this point in the history
  • Loading branch information
kp-cat committed Sep 24, 2024
1 parent fff2c50 commit 67ebd2c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/integration_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ defmodule ConfigCat.IntegrationTest do

@tag capture_log: true
test "raises error when starting another instance with the same SDK key" do
print_registry_contents()

{:ok, _} = start(@sdk_key, name: :original)

assert {:error, {{:EXIT, {error, _stacktrace}}, _spec}} =
Expand All @@ -107,6 +109,8 @@ defmodule ConfigCat.IntegrationTest do
end

test "maintains previous configuration when config has not changed between refreshes" do
print_registry_contents()

{:ok, client} = start(@sdk_key)

:ok = ConfigCat.force_refresh(client: client)
Expand All @@ -117,6 +121,8 @@ defmodule ConfigCat.IntegrationTest do
end

test "lazily fetches configuration when using lazy loading" do
print_registry_contents()

{:ok, client} =
start(
@sdk_key,
Expand All @@ -129,6 +135,8 @@ defmodule ConfigCat.IntegrationTest do

@tag capture_log: true
test "does not fetch config when offline mode is set" do
print_registry_contents()

{:ok, client} = start(@sdk_key, offline: true)

assert ConfigCat.offline?(client: client)
Expand Down Expand Up @@ -175,6 +183,8 @@ defmodule ConfigCat.IntegrationTest do

@tag capture_log: true
test "handles timeout" do
print_registry_contents()

{:ok, client} =
start(@sdk_key, connect_timeout_milliseconds: 0, read_timeout_milliseconds: 0)

Expand Down

0 comments on commit 67ebd2c

Please sign in to comment.