Skip to content

Commit

Permalink
fixed a log message
Browse files Browse the repository at this point in the history
  • Loading branch information
zashraf1985 committed Dec 22, 2020
1 parent dd4add4 commit 87894b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/optimizely/decision_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def get_saved_variation_id(project_config, experiment_id, user_profile)
variation_id = decision[:variation_id]
return variation_id, nil if project_config.variation_id_exists?(experiment_id, variation_id)

message = "User '#{user_profile['user_id']}' was previously bucketed into variation ID '#{variation_id}' for experiment '#{experiment_id}', but no matching variation was found. Re-bucketing user."
message = "User '#{user_profile[:user_id]}' was previously bucketed into variation ID '#{variation_id}' for experiment '#{experiment_id}', but no matching variation was found. Re-bucketing user."
@logger.log(Logger::INFO, message)

[nil, message]
Expand Down
2 changes: 1 addition & 1 deletion spec/decision_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@
variation_received, reasons = decision_service.get_variation(config, 'test_experiment', 'test_user')
expect(variation_received).to eq('111128')
expect(reasons).to eq([
"User '' was previously bucketed into variation ID '111111' for experiment '111127', but no matching variation was found. Re-bucketing user.",
"User 'test_user' was previously bucketed into variation ID '111111' for experiment '111127', but no matching variation was found. Re-bucketing user.",
"Audiences for experiment 'test_experiment' collectively evaluated to TRUE.",
"User 'test_user' is in variation 'control' of experiment 'test_experiment'."
])
Expand Down

0 comments on commit 87894b3

Please sign in to comment.