From d2ae14fc5a8e547ab4908a2e8f0f64809a86d817 Mon Sep 17 00:00:00 2001 From: Maciej Mensfeld Date: Wed, 27 Sep 2023 18:43:03 +0200 Subject: [PATCH] remarks --- .../karafka/web/ui/pro/controllers/consumers_spec.rb | 8 ++++---- spec/lib/karafka/web/ui/pro/controllers/health_spec.rb | 4 ++-- spec/lib/karafka/web/ui/pro/controllers/jobs_spec.rb | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/spec/lib/karafka/web/ui/pro/controllers/consumers_spec.rb b/spec/lib/karafka/web/ui/pro/controllers/consumers_spec.rb index aad7e47d..a397aa0d 100644 --- a/spec/lib/karafka/web/ui/pro/controllers/consumers_spec.rb +++ b/spec/lib/karafka/web/ui/pro/controllers/consumers_spec.rb @@ -58,8 +58,8 @@ topics_config.consumers.states = states_topic topics_config.consumers.reports = reports_topic - data = Fixtures.file('consumers_state.json') - base_report = Fixtures.json('consumer_report') + data = Fixtures.json('consumers_state', symbolize_names: false) + base_report = Fixtures.json('consumer_report', symbolize_names: false) 100.times do |i| name = "shinra:#{i}:#{i}" @@ -160,7 +160,7 @@ before do topics_config.consumers.reports = reports_topic - report = Fixtures.json('consumer_report') + report = Fixtures.json('consumer_report', symbolize_names: false) report['jobs'] = [] produce(reports_topic, report.to_json) @@ -203,7 +203,7 @@ before do topics_config.consumers.reports = reports_topic - report Fixtures.json('consumer_report') + report = Fixtures.json('consumer_report', symbolize_names: false) report['consumer_groups'] = {} produce(reports_topic, report.to_json) diff --git a/spec/lib/karafka/web/ui/pro/controllers/health_spec.rb b/spec/lib/karafka/web/ui/pro/controllers/health_spec.rb index 34fba117..e8c4491c 100644 --- a/spec/lib/karafka/web/ui/pro/controllers/health_spec.rb +++ b/spec/lib/karafka/web/ui/pro/controllers/health_spec.rb @@ -83,7 +83,7 @@ context 'when one of partitions is at risk due to LSO' do before do - report = Fixtures.json('consumer_report') + report = Fixtures.json('consumer_report', symbolize_names: false) partition_data = report.dig(*partition_scope) @@ -111,7 +111,7 @@ context 'when one of partitions is stopped due to LSO' do before do - report = Fixtures.json('consumer_report') + report = Fixtures.json('consumer_report', symbolize_names: false) partition_data = report.dig(*partition_scope) diff --git a/spec/lib/karafka/web/ui/pro/controllers/jobs_spec.rb b/spec/lib/karafka/web/ui/pro/controllers/jobs_spec.rb index 552cdedb..65e2d2ab 100644 --- a/spec/lib/karafka/web/ui/pro/controllers/jobs_spec.rb +++ b/spec/lib/karafka/web/ui/pro/controllers/jobs_spec.rb @@ -41,19 +41,19 @@ topics_config.consumers.states = states_topic topics_config.consumers.reports = reports_topic - data = Fixtures.json('consumers_state') - base_report = Fixtures.json('consumer_report') + data = Fixtures.json('consumers_state', symbolize_names: false) + base_report = Fixtures.json('consumer_report', symbolize_names: false) 100.times do |i| - name = "shinra:#{i}:#{i}".to_sym + name = "shinra:#{i}:#{i}" - data[:processes][name] = { + data['processes'][name] = { dispatched_at: 2_690_818_669.526_218, offset: i } report = base_report.dup - report[:process][:name] = name + report['process']['name'] = name produce(reports_topic, report.to_json, key: name) end