diff --git a/lib/splitclient-rb/clients/split_client.rb b/lib/splitclient-rb/clients/split_client.rb index db33a9f9..1e12271a 100644 --- a/lib/splitclient-rb/clients/split_client.rb +++ b/lib/splitclient-rb/clients/split_client.rb @@ -267,7 +267,7 @@ def treatments(key, feature_flag_names, attributes = {}, calling_method = 'get_t to_return = Hash.new sanitized_feature_flag_names.each {|name| to_return[name.to_sym] = control_treatment_with_config - impressions << @impressions_manager.build_impression(matching_key, bucketing_key, name.to_sym, control_treatment_with_config.merge({ label: Engine::Models::Label::NOT_READY }), { attributes: attributes, time: nil }) + impressions << { :impression => @impressions_manager.build_impression(matching_key, bucketing_key, name.to_sym, control_treatment_with_config.merge({ :label => Engine::Models::Label::NOT_READY }), false, { attributes: attributes, time: nil }), :disabled => false } } @impressions_manager.track(impressions) return to_return @@ -278,7 +278,6 @@ def treatments(key, feature_flag_names, attributes = {}, calling_method = 'get_t valid_feature_flag_names << feature_flag_name unless feature_flag_name.nil? } start = Time.now - impressions_total = [] feature_flags = @splits_repository.splits(valid_feature_flag_names) treatments = Hash.new @@ -291,15 +290,14 @@ def treatments(key, feature_flag_names, attributes = {}, calling_method = 'get_t next end treatments_labels_change_numbers, impressions = evaluate_treatment(feature_flag, key, bucketing_key, matching_key, attributes, calling_method) - impressions_total.concat(impressions) unless impressions.nil? treatments[key] = { treatment: treatments_labels_change_numbers[:treatment], config: treatments_labels_change_numbers[:config] } + @impressions_manager.track(impressions) unless impressions.empty? end record_latency(calling_method, start) - @impressions_manager.track(impressions_total) unless impressions_total.empty? treatments.merge(invalid_treatments) end @@ -345,37 +343,37 @@ def evaluate_treatment(feature_flag, feature_flag_name, bucketing_key, matching_ if feature_flag.nil? && ready? @config.logger.warn("#{calling_method}: you passed #{feature_flag_name} that " \ 'does not exist in this environment, please double check what feature flags exist in the Split user interface') - return parsed_treatment(control_treatment.merge({ label: Engine::Models::Label::NOT_FOUND }), multiple), nil + return parsed_treatment(control_treatment.merge({ :label => Engine::Models::Label::NOT_FOUND }), multiple), nil end - treatment_data = + if !feature_flag.nil? && ready? - @evaluator.evaluate_feature_flag( + treatment_data = @evaluator.evaluate_feature_flag( { bucketing_key: bucketing_key, matching_key: matching_key }, feature_flag, attributes ) + impressions_disabled = feature_flag[:impressionsDisabled] else @config.logger.error("#{calling_method}: the SDK is not ready, results may be incorrect for feature flag #{feature_flag_name}. Make sure to wait for SDK readiness before using this method.") - control_treatment.merge({ label: Engine::Models::Label::NOT_READY }) + treatment_data = control_treatment.merge({ :label => Engine::Models::Label::NOT_READY }) + impressions_disabled = false end record_latency(calling_method, start) - impression_decorator = { impression: @impressions_manager.build_impression(matching_key, bucketing_key, feature_flag_name, treatment_data, feature_flag[:impressionsDisabled], { attributes: attributes, time: nil }), disabled: feature_flag[:impressionsDisabled] } + impression_decorator = { :impression => @impressions_manager.build_impression(matching_key, bucketing_key, feature_flag_name, treatment_data, impressions_disabled, params={ attributes: attributes, time: nil }), :disabled => impressions_disabled } impressions_decorator << impression_decorator unless impression_decorator.nil? rescue StandardError => e @config.log_found_exception(__method__.to_s, e) - record_exception(calling_method) - - impression_decorator = { impression: @impressions_manager.build_impression(matching_key, bucketing_key, feature_flag_name, control_treatment, { attributes: attributes, time: nil }), disabled: false } + impression_decorator = { :impression => @impressions_manager.build_impression(matching_key, bucketing_key, feature_flag_name, control_treatment, false, { attributes: attributes, time: nil }), :disabled => false } impressions_decorator << impression_decorator unless impression_decorator.nil? - return parsed_treatment(control_treatment.merge({ label: Engine::Models::Label::EXCEPTION }), multiple), impressions_decorator + return parsed_treatment(control_treatment.merge({ :label => Engine::Models::Label::EXCEPTION }), multiple), impressions_decorator end return parsed_treatment(treatment_data, multiple), impressions_decorator end def control_treatment - { treatment: Engine::Models::Treatment::CONTROL } + { :treatment => Engine::Models::Treatment::CONTROL } end def control_treatment_with_config diff --git a/lib/splitclient-rb/engine/common/impressions_manager.rb b/lib/splitclient-rb/engine/common/impressions_manager.rb index 0fee4033..81873347 100644 --- a/lib/splitclient-rb/engine/common/impressions_manager.rb +++ b/lib/splitclient-rb/engine/common/impressions_manager.rb @@ -18,8 +18,8 @@ def initialize(config, @unique_keys_tracker = unique_keys_tracker end - def build_impression(matching_key, bucketing_key, split_name, treatment, impressions_disabled, params = {}) - impression_data = impression_data(matching_key, bucketing_key, split_name, treatment, params[:time]) + def build_impression(matching_key, bucketing_key, split_name, treatment_data, impressions_disabled, params = {}) + impression_data = impression_data(matching_key, bucketing_key, split_name, treatment_data, params[:time]) begin if @config.impressions_mode == :none || impressions_disabled # In NONE mode we should track the total amount of evaluations and the unique keys. @impression_counter.inc(split_name, impression_data[:m]) @@ -41,10 +41,11 @@ def track(impressions_decorator) return if impressions_decorator.empty? impressions_decorator.each do |impression_decorator| + impression_router.add_bulk([impression_decorator[:impression]]) stats = { dropped: 0, queued: 0, dedupe: 0 } begin if @config.impressions_mode == :none || impression_decorator[:disabled] - return + next elsif @config.impressions_mode == :debug track_debug_mode([impression_decorator[:impression]], stats) elsif @config.impressions_mode == :optimized @@ -54,7 +55,6 @@ def track(impressions_decorator) @config.log_found_exception(__method__.to_s, e) ensure record_stats(stats) - impression_router.add_bulk([impression_decorator[:impression]]) end end end diff --git a/spec/cache/repositories/impressions_repository_spec.rb b/spec/cache/repositories/impressions_repository_spec.rb index 7a4e0c3a..c422d34c 100644 --- a/spec/cache/repositories/impressions_repository_spec.rb +++ b/spec/cache/repositories/impressions_repository_spec.rb @@ -55,8 +55,8 @@ it 'adds impressions' do params = { attributes: {}, time: 1_478_113_516_002 } impressions = [] - impressions << impressions_manager.build_impression('matching_key1', nil, :foo, treatment1, params) - impressions << impressions_manager.build_impression('matching_key1', nil, :bar, treatment2, params) + impressions << { :impression => impressions_manager.build_impression('matching_key1', nil, :foo, treatment1, false, params), :disabled => false } + impressions << { :impression => impressions_manager.build_impression('matching_key1', nil, :bar, treatment2, false, params), :disabled => false } impressions_manager.track(impressions) expect(repository.batch).to match_array(result) @@ -67,8 +67,8 @@ it 'adds impressions in bulk' do params = { attributes: {}, time: 1_478_113_516_002 } impressions = [] - impressions << impressions_manager.build_impression('matching_key1', nil, :foo, treatment1, params) - impressions << impressions_manager.build_impression('matching_key1', nil, :bar, treatment2, params) + impressions << { :impression => impressions_manager.build_impression('matching_key1', nil, :foo, treatment1, false, params), :disabled => false } + impressions << { :impression => impressions_manager.build_impression('matching_key1', nil, :bar, treatment2, false, params), :disabled => false } impressions_manager.track(impressions) expect(repository.batch).to match_array(result) @@ -80,7 +80,7 @@ config.labels_enabled = false params = { attributes: {}, time: 1_478_113_516_002 } impressions = [] - impressions << impressions_manager.build_impression('matching_key1', nil, :foo, treatment1, params) + impressions << { :impression => impressions_manager.build_impression('matching_key1', nil, :foo, treatment1, false, params), :disabled => false } impressions_manager.track(impressions) expect(repository.batch.first[:i][:r]).to be_nil @@ -89,8 +89,8 @@ it 'bulk size less than the actual queue' do params = { attributes: {}, time: 1_478_113_516_002 } impressions = [] - impressions << impressions_manager.build_impression('matching_key1', nil, :foo, treatment1, params) - impressions << impressions_manager.build_impression('matching_key1', nil, :foo, treatment2, params) + impressions << { :impression => impressions_manager.build_impression('matching_key1', nil, :foo, treatment1, false, params), :disabled => false } + impressions << { :impression => impressions_manager.build_impression('matching_key1', nil, :foo, treatment2, false, params), :disabled => false } impressions_manager.track(impressions) config.impressions_bulk_size = 1 @@ -142,8 +142,8 @@ treatment = { treatment: 'on', label: 'sample_rule', change_number: 1_533_177_602_748 } params = { attributes: {}, time: 1_478_113_516_002 } impressions = [] - impressions << impressions_manager.build_impression('matching_key1', nil, :foo1, treatment, params) - impressions << impressions_manager.build_impression('matching_key2', nil, :foo1, treatment, params) + impressions << { :impression => impressions_manager.build_impression('matching_key1', nil, :foo1, treatment, false, params), :disabled => false } + impressions << { :impression => impressions_manager.build_impression('matching_key2', nil, :foo1, treatment, false, params), :disabled => false } impressions_manager.track(impressions) expect(repository.batch.size).to eq(1) @@ -200,8 +200,8 @@ expect(config.impressions_adapter).to receive(:expire).once.with(anything, 3600) params = { attributes: {}, time: 1_478_113_516_002 } impressions = [] - impressions << impressions_manager.build_impression('matching_key', nil, :foo1, treatment, params) - impressions << impressions_manager.build_impression('matching_key', nil, :foo1, treatment, params) + impressions << { :impression => impressions_manager.build_impression('matching_key', nil, :foo1, treatment, false, params), :disabled => false } + impressions << { :impression => impressions_manager.build_impression('matching_key', nil, :foo1, treatment, false, params), :disabled => false } impressions_manager.track(impressions) end @@ -211,7 +211,7 @@ params = { attributes: {}, time: 1_478_113_516_002 } impressions = [] - impressions << impressions_manager.build_impression('matching_key', nil, :foo1, treatment, params) + impressions << { :impression => impressions_manager.build_impression('matching_key', nil, :foo1, treatment, false, params), :disabled => false } impressions_manager.track(impressions) expect(repository.batch).to eq([]) @@ -221,8 +221,8 @@ other_treatment = { treatment: 'on', label: 'sample_rule_2', change_number: 1_533_177_602_748 } params = { attributes: {}, time: 1_478_113_516_002 } impressions = [] - impressions << impressions_manager.build_impression('matching_key', nil, :foo1, treatment, params) - impressions << impressions_manager.build_impression('matching_key', nil, :foo2, other_treatment, params) + impressions << { :impression => impressions_manager.build_impression('matching_key', nil, :foo1, treatment, false, params), :disabled => false } + impressions << { :impression => impressions_manager.build_impression('matching_key', nil, :foo2, other_treatment, false, params), :disabled => false } impressions_manager.track(impressions) adapter.get_from_queue('SPLITIO.impressions', 0).map do |e| @@ -252,8 +252,8 @@ params = { attributes: {}, time: 1_478_113_516_002 } impressions = [] - impressions << custom_impressions_manager.build_impression('matching_key', nil, :foo1, treatment, params) - impressions << custom_impressions_manager.build_impression('matching_key', nil, :foo2, other_treatment, params) + impressions << { :impression => custom_impressions_manager.build_impression('matching_key', nil, :foo1, treatment, false, params), :disabled => false } + impressions << { :impression => custom_impressions_manager.build_impression('matching_key', nil, :foo2, other_treatment, false, params), :disabled => false } custom_impressions_manager.track(impressions) custom_adapter.get_from_queue('SPLITIO.impressions', 0).map do |e| diff --git a/spec/cache/senders/impressions_formatter_spec.rb b/spec/cache/senders/impressions_formatter_spec.rb index 621ffdd7..e55228ff 100644 --- a/spec/cache/senders/impressions_formatter_spec.rb +++ b/spec/cache/senders/impressions_formatter_spec.rb @@ -43,8 +43,8 @@ params2 = { attributes: {}, time: 1_478_113_518_285 } @impressions = [] - @impressions << impressions_manager.build_impression('matching_key', 'foo1', 'foo1', treatment1, params) - @impressions << impressions_manager.build_impression('matching_key2', 'foo2', 'foo2', treatment2, params2) + @impressions << { :impression => impressions_manager.build_impression('matching_key', 'foo1', 'foo1', treatment1, false, params), :disabled => false } + @impressions << { :impression => impressions_manager.build_impression('matching_key2', 'foo2', 'foo2', treatment2, false, params2), :disabled => false } impressions_manager.track(@impressions) end @@ -75,7 +75,7 @@ it 'formats multiple impressions for one key' do params = { attributes: {}, time: 1_478_113_518_900 } impressions = [] - impressions << impressions_manager.build_impression('matching_key3', nil, 'foo2', treatment3, params) + impressions << { :impression => impressions_manager.build_impression('matching_key3', nil, 'foo2', treatment3, false, params), :disabled => false } impressions_manager.track(impressions) expect(formatted_impressions.find { |i| i[:f] == :foo1 }[:i]).to match_array( diff --git a/spec/cache/senders/impressions_sender_spec.rb b/spec/cache/senders/impressions_sender_spec.rb index 9976a1de..96da8aa9 100644 --- a/spec/cache/senders/impressions_sender_spec.rb +++ b/spec/cache/senders/impressions_sender_spec.rb @@ -45,8 +45,8 @@ params = { attributes: {}, time: 1_478_113_516_002 } params2 = { attributes: {}, time: 1_478_113_518_285 } impressions = [] - impressions << impressions_manager.build_impression('matching_key', 'foo1', 'foo1', treatment1, params) - impressions << impressions_manager.build_impression('matching_key2', 'foo2', 'foo2', treatment2, params2) + impressions << { :impression => impressions_manager.build_impression('matching_key', 'foo1', 'foo1', treatment1, false, params), :disabled => false } + impressions << { :impression => impressions_manager.build_impression('matching_key2', 'foo2', 'foo2', treatment2, false, params2), :disabled => false } impressions_manager.track(impressions) end diff --git a/spec/cache/senders/localhost_repo_cleaner_spec.rb b/spec/cache/senders/localhost_repo_cleaner_spec.rb index d03d8220..ee0e21ef 100644 --- a/spec/cache/senders/localhost_repo_cleaner_spec.rb +++ b/spec/cache/senders/localhost_repo_cleaner_spec.rb @@ -46,11 +46,12 @@ treatment_data = { treatment: 'on', label: 'sample_rule', change_number: 1_533_177_602_748 } params = { attributes: {}, time: nil } impressions = [] - impressions << impressions_manager.build_impression('matching_key', + impressions << { :impression => impressions_manager.build_impression('matching_key', 'foo1', 'foo1', treatment_data, - params) + false, + params), :disabled => false } impressions_manager.track(impressions) diff --git a/spec/engine_spec.rb b/spec/engine_spec.rb index 8d09ae25..3631da63 100644 --- a/spec/engine_spec.rb +++ b/spec/engine_spec.rb @@ -48,12 +48,18 @@ stub_request(:any, /https:\/\/events.*/).to_return(status: 200, body: '') stub_request(:get, /https:\/\/sdk\.split\.io\/api\/splitChanges\?s=1\.1&since/) .to_return(status: 200, body: '') + stub_request(:post, "https://telemetry.split.io/api/v1/metrics/config") + .to_return(status: 200, body: '') end before :each do Redis.new.flushall if @mode.equal?(:consumer) end + after(:each) do + subject.destroy + end + context '#equal_to_set_matcher and get_treatment validation attributes' do before do equal_to_set_matcher_json = File.read(File.join(SplitIoClient.root, 'spec/test_data/splits/engine/equal_to_set_matcher.json')) @@ -726,6 +732,7 @@ context 'whitelist matcher' do before do + stub_request(:get, "https://sdk.split.io/api/segmentChanges/demo?since=-1").to_return(status: 200, body: "") whitelist_matcher_json = File.read(File.join(SplitIoClient.root, 'spec/test_data/splits/engine/whitelist_matcher.json')) load_splits(whitelist_matcher_json, flag_sets_json) subject.block_until_ready @@ -832,20 +839,18 @@ before do impressions_test_json = File.read(File.join(SplitIoClient.root, 'spec/test_data/splits/engine/impressions_test.json')) load_splits(impressions_test_json, flag_sets_json) - stub_request(:get, /https:\/\/sdk\.split\.io\/api\/splitChanges\?s=1\.1&since/).to_return(status: 200, body: '') + subject.block_until_ready(5) end it 'returns correct impressions for get_treatments checking ' do - subject.get_treatments('26', %w[sample_feature beta_feature]) # Need this because we're storing impressions in the Set # Without sleep we may have identical impressions (including time) # In that case only one impression with key "26" would be stored sleep 1 subject.get_treatments('26', %w[sample_feature beta_feature]) - + sleep 1 impressions = customer_impression_listener.queue - expect(impressions.size >= 2).to be true close_redis end @@ -872,7 +877,8 @@ before do traffic_allocation_json = File.read(File.join(SplitIoClient.root, 'spec/test_data/splits/splits_traffic_allocation.json')) load_splits(traffic_allocation_json, flag_sets_json) - subject.block_until_ready + subject.block_until_ready(5) + add_splits_to_repository(traffic_allocation_json) end it 'returns expected treatment' do @@ -1267,7 +1273,8 @@ def load_splits(splits_json, flag_sets_json) if @mode.equal?(:standalone) - stub_request(:get, /https:\/\/sdk\.split\.io\/api\/splitChanges\?s=1\.1&since.*/) +# stub_request(:get, /https:\/\/sdk\.split\.io\/api\/splitChanges\?s=1\.1&since.*/) + stub_request(:get, "https://sdk.split.io/api/splitChanges?s=1.1&since=-1") .to_return(status: 200, body: splits_json) else add_splits_to_repository(splits_json) diff --git a/spec/integrations/in_memory_client_spec.rb b/spec/integrations/in_memory_client_spec.rb index 1120b57a..8de25df7 100644 --- a/spec/integrations/in_memory_client_spec.rb +++ b/spec/integrations/in_memory_client_spec.rb @@ -45,7 +45,27 @@ # sleep 1 end + # after(:each) do + # client.destroy + # sleep 0.5 + #end + context '#get_treatment' do + it 'returns CONTROL when server return 500' do + # stub_request(:get, "https://sdk.split.io/api/splitChanges?s=1.1&since=1506703262916").to_return(status: 200, body: 'ok') + mock_split_changes_error + expect(client.get_treatment('nico_test', 'FACUNDO_TEST')).to eq 'control' + + sleep 0.5 + impressions = custom_impression_listener.queue + expect(impressions.size).to eq 1 + expect(impressions[0][:matching_key]).to eq('nico_test') + expect(impressions[0][:split_name]).to eq('FACUNDO_TEST') + expect(impressions[0][:treatment][:treatment]).to eq('control') + expect(impressions[0][:treatment][:label]).to eq('not ready') + expect(impressions[0][:treatment][:change_number]).to eq(nil) + end + it 'returns treatments with FACUNDO_TEST feature and check impressions' do stub_request(:get, "https://sdk.split.io/api/splitChanges?s=1.1&since=1506703262916").to_return(status: 200, body: 'ok') client.block_until_ready @@ -130,23 +150,6 @@ expect(impressions.size).to eq 0 end - it 'returns CONTROL when server return 500' do - stub_request(:get, "https://sdk.split.io/api/splitChanges?s=1.1&since=1506703262916").to_return(status: 200, body: 'ok') - mock_split_changes_error - - expect(client.get_treatment('nico_test', 'FACUNDO_TEST')).to eq 'control' - - sleep 0.5 - impressions = custom_impression_listener.queue - - expect(impressions.size).to eq 1 - expect(impressions[0][:matching_key]).to eq('nico_test') - expect(impressions[0][:split_name]).to eq('FACUNDO_TEST') - expect(impressions[0][:treatment][:treatment]).to eq('control') - expect(impressions[0][:treatment][:label]).to eq('not ready') - expect(impressions[0][:treatment][:change_number]).to eq(nil) - end - it 'with multiple factories returns on' do # stub_request(:get, "https://sdk.split.io/api/splitChanges?s=1.1&since=1506703262916").to_return(status: 200, body: 'ok') local_log = StringIO.new @@ -450,7 +453,7 @@ it 'returns CONTROL when server return 500' do mock_split_changes_error - + sleep 1 result = client.get_treatments('nico_test', %w[FACUNDO_TEST random_treatment]) expect(result[:FACUNDO_TEST]).to eq 'control' diff --git a/spec/test_data/integrations/splits.json b/spec/test_data/integrations/splits.json index dd94bd8f..4361b6bb 100644 --- a/spec/test_data/integrations/splits.json +++ b/spec/test_data/integrations/splits.json @@ -1,6 +1,7 @@ { "splits": [ { + "impressionsDisabled": false, "trafficTypeName": "account", "name": "FACUNDO_TEST", "trafficAllocation": 59, @@ -120,6 +121,7 @@ "sets": ["set_3"] }, { + "impressionsDisabled": false, "trafficTypeName": "account", "name": "testing", "trafficAllocation": 100, @@ -233,6 +235,7 @@ "sets": ["set_2"] }, { + "impressionsDisabled": false, "trafficTypeName": "account", "name": "testing222", "trafficAllocation": 100, @@ -286,6 +289,7 @@ "sets": ["set_1", "set_2"] }, { + "impressionsDisabled": false, "trafficTypeName": "account", "name": "a_new_split_2", "trafficAllocation": 99, @@ -551,6 +555,7 @@ "sets": [] }, { + "impressionsDisabled": false, "trafficTypeName": "account", "name": "test_string_without_attr", "trafficAllocation": 100, @@ -620,6 +625,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "user", "name": "Test", "trafficAllocation": 100, @@ -745,6 +751,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "account", "name": "Test_Save_1", "trafficAllocation": 100, @@ -891,6 +898,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "account", "name": "TEST", "trafficAllocation": 100, @@ -939,6 +947,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "user", "name": "benchmark_jw_1", "trafficAllocation": 100, @@ -1025,6 +1034,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "user", "name": "nico_tests", "trafficAllocation": 100, @@ -1070,6 +1080,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "account", "name": "testo2222", "trafficAllocation": 100, @@ -1282,6 +1293,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "user", "name": "Tagging", "trafficAllocation": 100, @@ -1330,6 +1342,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "account", "name": "Welcome_Page_UI", "trafficAllocation": 100, @@ -1381,6 +1394,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "test", "name": "pato_test_3", "trafficAllocation": 100, @@ -1429,6 +1443,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "account", "name": "testo23", "trafficAllocation": 100, @@ -1477,6 +1492,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "account", "name": "testo909090", "trafficAllocation": 100, @@ -1643,6 +1659,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "account", "name": "testo22", "trafficAllocation": 100, @@ -1691,6 +1708,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "user", "name": "test-net", "trafficAllocation": 100, @@ -1739,6 +1757,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "account", "name": "test_dep_2", "trafficAllocation": 100, @@ -1831,6 +1850,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "account", "name": "Definition_As_Of_Clickable_UI", "trafficAllocation": 100, @@ -1911,6 +1931,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "account", "name": "Identify_UI", "trafficAllocation": 100, @@ -1959,6 +1980,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "account", "name": "test_definition_as_of", "trafficAllocation": 100, @@ -2007,6 +2029,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "user", "name": "Test-jw-go", "trafficAllocation": 100, @@ -2085,6 +2108,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "user", "name": "benchmark_jw_7", "trafficAllocation": 100, @@ -2133,6 +2157,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "user", "name": "benchmark_jw_6", "trafficAllocation": 100, @@ -2181,6 +2206,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "user", "name": "benchmark_jw_5", "trafficAllocation": 100, @@ -2229,6 +2255,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "user", "name": "benchmark_jw_4", "trafficAllocation": 100, @@ -2277,6 +2304,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "user", "name": "benchmark_jw_3", "trafficAllocation": 100, @@ -2325,6 +2353,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "user", "name": "benchmark_jw_2", "trafficAllocation": 100, @@ -2373,6 +2402,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "account", "name": "MAURO_TEST", "trafficAllocation": 59, diff --git a/spec/test_data/integrations/splits_push.json b/spec/test_data/integrations/splits_push.json index a6f08de3..833a41a9 100644 --- a/spec/test_data/integrations/splits_push.json +++ b/spec/test_data/integrations/splits_push.json @@ -1,6 +1,7 @@ { "splits": [ { + "impressionsDisabled": false, "trafficTypeName": "user", "name": "push_test", "trafficAllocation": 44, @@ -86,6 +87,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "user", "name": "tinchotest", "trafficAllocation": 24, @@ -135,6 +137,7 @@ ] }, { + "impressionsDisabled": false, "trafficTypeName": "user", "name": "test_split", "trafficAllocation": 100, @@ -184,6 +187,7 @@ ] }, { + "impressionsDisabled": false, "name":"feature_segment", "trafficTypeId":"u", "trafficTypeName":"User", diff --git a/spec/test_data/integrations/splits_push3.json b/spec/test_data/integrations/splits_push3.json index a0c43a50..8984c5ff 100644 --- a/spec/test_data/integrations/splits_push3.json +++ b/spec/test_data/integrations/splits_push3.json @@ -1,6 +1,7 @@ { "splits": [ { + "impressionsDisabled": false, "trafficTypeName": "user", "name": "push_test", "trafficAllocation": 44,