Skip to content

Commit

Permalink
fix use counter reference variable
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRyanSmith committed Jan 16, 2025
1 parent cb9af5e commit 1d054a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions framework/origin_trials_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ def _send_create_trial_request(
'bucket_number': ot_stage.ot_use_counter_bucket_number,
'histogram_id': BlinkHistogramID.web_feature.value
}
if (ot_stage.ot_chromium_trial_name
and ot_stage.ot_chromium_trial_name.startswith('WebDXFeature::')):
if (ot_stage.ot_webfeature_use_counter
and ot_stage.ot_webfeature_use_counter.startswith('WebDXFeature::')):
config['histogram_id'] = BlinkHistogramID.webdx_feature.value
json['trial']['blink_use_counter_config'] = config

Expand Down
2 changes: 1 addition & 1 deletion framework/origin_trials_client_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def test_create_origin_trial__webdx_feature(
self, mock_requests_post, mock_get_trial_end_time,
mock_get_ot_access_token, mock_api_key_get, mock_get_admin_group):
"""WebDXFeature use counters should have different config in request."""
self.ot_stage.ot_chromium_trial_name = 'WebDXFeature::Example'
self.ot_stage.ot_webfeature_use_counter = 'WebDXFeature::Example'
self.ot_stage.put()
mock_requests_post.return_value = mock.MagicMock(
status_code=200, json=lambda : (
Expand Down

0 comments on commit 1d054a1

Please sign in to comment.