Skip to content

Commit

Permalink
remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
mensfeld committed Sep 27, 2023
1 parent 3377b7c commit d2ae14f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions spec/lib/karafka/web/ui/pro/controllers/consumers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/karafka/web/ui/pro/controllers/health_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down
10 changes: 5 additions & 5 deletions spec/lib/karafka/web/ui/pro/controllers/jobs_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d2ae14f

Please sign in to comment.