@@ -204,25 +204,25 @@ TEST_F(AccessLogImplTest, RuntimeFilter) {
204204
205205 // Value is taken from random generator.
206206 EXPECT_CALL (context_.random_ , random ()).WillOnce (Return (42 ));
207- EXPECT_CALL (runtime_.snapshot_ , featureEnabledEx (" access_log.test_key" , 0 , 42 , 100 ))
207+ EXPECT_CALL (runtime_.snapshot_ , sampleFeatureEnabled (" access_log.test_key" , 0 , 42 , 100 ))
208208 .WillOnce (Return (true ));
209209 EXPECT_CALL (*file_, write (_));
210210 log->log (&request_headers_, &response_headers_, &response_trailers_, request_info_);
211211
212212 EXPECT_CALL (context_.random_ , random ()).WillOnce (Return (43 ));
213- EXPECT_CALL (runtime_.snapshot_ , featureEnabledEx (" access_log.test_key" , 0 , 43 , 100 ))
213+ EXPECT_CALL (runtime_.snapshot_ , sampleFeatureEnabled (" access_log.test_key" , 0 , 43 , 100 ))
214214 .WillOnce (Return (false ));
215215 EXPECT_CALL (*file_, write (_)).Times (0 );
216216 log->log (&request_headers_, &response_headers_, &response_trailers_, request_info_);
217217
218218 // Value is taken from x-request-id.
219219 request_headers_.addCopy (" x-request-id" , " 000000ff-0000-0000-0000-000000000000" );
220- EXPECT_CALL (runtime_.snapshot_ , featureEnabledEx (" access_log.test_key" , 0 , 55 , 100 ))
220+ EXPECT_CALL (runtime_.snapshot_ , sampleFeatureEnabled (" access_log.test_key" , 0 , 55 , 100 ))
221221 .WillOnce (Return (true ));
222222 EXPECT_CALL (*file_, write (_));
223223 log->log (&request_headers_, &response_headers_, &response_trailers_, request_info_);
224224
225- EXPECT_CALL (runtime_.snapshot_ , featureEnabledEx (" access_log.test_key" , 0 , 55 , 100 ))
225+ EXPECT_CALL (runtime_.snapshot_ , sampleFeatureEnabled (" access_log.test_key" , 0 , 55 , 100 ))
226226 .WillOnce (Return (false ));
227227 EXPECT_CALL (*file_, write (_)).Times (0 );
228228 log->log (&request_headers_, &response_headers_, &response_trailers_, request_info_);
@@ -245,25 +245,25 @@ name: envoy.file_access_log
245245
246246 // Value is taken from random generator.
247247 EXPECT_CALL (context_.random_ , random ()).WillOnce (Return (42 ));
248- EXPECT_CALL (runtime_.snapshot_ , featureEnabledEx (" access_log.test_key" , 5 , 42 , 10000 ))
248+ EXPECT_CALL (runtime_.snapshot_ , sampleFeatureEnabled (" access_log.test_key" , 5 , 42 , 10000 ))
249249 .WillOnce (Return (true ));
250250 EXPECT_CALL (*file_, write (_));
251251 log->log (&request_headers_, &response_headers_, &response_trailers_, request_info_);
252252
253253 EXPECT_CALL (context_.random_ , random ()).WillOnce (Return (43 ));
254- EXPECT_CALL (runtime_.snapshot_ , featureEnabledEx (" access_log.test_key" , 5 , 43 , 10000 ))
254+ EXPECT_CALL (runtime_.snapshot_ , sampleFeatureEnabled (" access_log.test_key" , 5 , 43 , 10000 ))
255255 .WillOnce (Return (false ));
256256 EXPECT_CALL (*file_, write (_)).Times (0 );
257257 log->log (&request_headers_, &response_headers_, &response_trailers_, request_info_);
258258
259259 // Value is taken from x-request-id.
260260 request_headers_.addCopy (" x-request-id" , " 000000ff-0000-0000-0000-000000000000" );
261- EXPECT_CALL (runtime_.snapshot_ , featureEnabledEx (" access_log.test_key" , 5 , 255 , 10000 ))
261+ EXPECT_CALL (runtime_.snapshot_ , sampleFeatureEnabled (" access_log.test_key" , 5 , 255 , 10000 ))
262262 .WillOnce (Return (true ));
263263 EXPECT_CALL (*file_, write (_));
264264 log->log (&request_headers_, &response_headers_, &response_trailers_, request_info_);
265265
266- EXPECT_CALL (runtime_.snapshot_ , featureEnabledEx (" access_log.test_key" , 5 , 255 , 10000 ))
266+ EXPECT_CALL (runtime_.snapshot_ , sampleFeatureEnabled (" access_log.test_key" , 5 , 255 , 10000 ))
267267 .WillOnce (Return (false ));
268268 EXPECT_CALL (*file_, write (_)).Times (0 );
269269 log->log (&request_headers_, &response_headers_, &response_trailers_, request_info_);
@@ -288,13 +288,13 @@ name: envoy.file_access_log
288288 // Value should not be taken from x-request-id.
289289 request_headers_.addCopy (" x-request-id" , " 000000ff-0000-0000-0000-000000000000" );
290290 EXPECT_CALL (context_.random_ , random ()).WillOnce (Return (42 ));
291- EXPECT_CALL (runtime_.snapshot_ , featureEnabledEx (" access_log.test_key" , 5 , 42 , 1000000 ))
291+ EXPECT_CALL (runtime_.snapshot_ , sampleFeatureEnabled (" access_log.test_key" , 5 , 42 , 1000000 ))
292292 .WillOnce (Return (true ));
293293 EXPECT_CALL (*file_, write (_));
294294 log->log (&request_headers_, &response_headers_, &response_trailers_, request_info_);
295295
296296 EXPECT_CALL (context_.random_ , random ()).WillOnce (Return (43 ));
297- EXPECT_CALL (runtime_.snapshot_ , featureEnabledEx (" access_log.test_key" , 5 , 43 , 1000000 ))
297+ EXPECT_CALL (runtime_.snapshot_ , sampleFeatureEnabled (" access_log.test_key" , 5 , 43 , 1000000 ))
298298 .WillOnce (Return (false ));
299299 EXPECT_CALL (*file_, write (_)).Times (0 );
300300 log->log (&request_headers_, &response_headers_, &response_trailers_, request_info_);
0 commit comments