diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-01-11 09:14:56 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-01-11 09:14:56 +0900 |
commit | 2a934aa3c9e82d43e4e984ad22717f957b4066da (patch) | |
tree | 4508cdf6be96b701301a1d362b8668683cc6281b /activesupport/test | |
parent | 013a8abd48a020954ff60524943fec82064147dc (diff) | |
parent | 62023884f76c108127c8966f4d67bb717338dd66 (diff) | |
download | rails-2a934aa3c9e82d43e4e984ad22717f957b4066da.tar.gz rails-2a934aa3c9e82d43e4e984ad22717f957b4066da.tar.bz2 rails-2a934aa3c9e82d43e4e984ad22717f957b4066da.zip |
Merge pull request #30268 from ignatiusreza/instrumentation
add instrumentation for read_multi
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/cache/cache_store_write_multi_test.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activesupport/test/cache/cache_store_write_multi_test.rb b/activesupport/test/cache/cache_store_write_multi_test.rb index 5b6fd678c5..7d606e3f7b 100644 --- a/activesupport/test/cache/cache_store_write_multi_test.rb +++ b/activesupport/test/cache/cache_store_write_multi_test.rb @@ -19,7 +19,7 @@ end class CacheStoreWriteMultiInstrumentationTest < ActiveSupport::TestCase setup do - @cache = ActiveSupport::Cache.lookup_store(:null_store) + @cache = ActiveSupport::Cache.lookup_store(:memory_store) end test "instrumentation" do @@ -35,15 +35,15 @@ class CacheStoreWriteMultiInstrumentationTest < ActiveSupport::TestCase end test "instrumentation with fetch_multi as super operation" do - skip "fetch_multi isn't instrumented yet" + @cache.write("b", "bb") - events = with_instrumentation "write_multi" do + events = with_instrumentation "read_multi" do @cache.fetch_multi("a", "b") { |key| key * 2 } end - assert_equal %w[ cache_write_multi.active_support ], events.map(&:name) - assert_nil events[0].payload[:super_operation] - assert !events[0].payload[:hit] + assert_equal %w[ cache_read_multi.active_support ], events.map(&:name) + assert_equal :fetch_multi, events[0].payload[:super_operation] + assert_equal ["b"], events[0].payload[:hits] end private |