@@ -204,7 +204,6 @@ def teardown
204204 test ".results contain vernierUserMetadata, and extra meta" do
205205 skip "metadata output added in >=1.7.0" if Gem . loaded_specs [ "vernier" ] . version < Gem ::Version . new ( "1.7.0" )
206206
207- initial_time = Process . clock_gettime ( Process ::CLOCK_MONOTONIC , :nanosecond )
208207 profile = AppProfiler . profiler . run (
209208 vernier_params (
210209 interval : 2000 ,
@@ -219,12 +218,17 @@ def teardown
219218 end
220219
221220 assert_instance_of ( AppProfiler ::VernierProfile , profile )
221+
222222 # Stores "internal" vernier metadata
223223 assert_equal ( :wall , profile . metadata [ :mode ] )
224224 assert_equal ( 2000 , profile . metadata [ :interval ] ) # The internal value takes precedence over the user value
225225 assert_equal ( 0 , profile . metadata [ :allocation_interval ] )
226226 assert_equal ( false , profile . metadata [ :gc ] )
227- assert_operator ( initial_time , :<= , profile . metadata [ :started_at ] )
227+
228+ # Don't include ignored/private metadata
229+ AppProfiler ::Backend ::VernierBackend ::PRIVATE_METADATA . each do |excluded |
230+ refute_includes ( profile . metadata , excluded )
231+ end
228232
229233 # Stores the user supplied data
230234 assert_equal ( "foo" , profile . metadata [ :user_data_1 ] )
0 commit comments