test/backend/process_info_test.rb in instana-1.205.0 vs test/backend/process_info_test.rb in instana-1.206.0

- old
+ new

@@ -58,6 +58,26 @@ assert_equal 35, subject.sched_pid assert subject.from_parent_namespace assert_equal subject.sched_pid, subject.parent_pid end end + + def test_osx_memory_used + host_os = RbConfig::CONFIG['host_os'] + RbConfig::CONFIG['host_os'] = 'darwin' + + subject = Instana::Backend::ProcessInfo.new(OpenStruct.new(rss: 1024)) + assert_equal 1, subject.memory_used + ensure + RbConfig::CONFIG['host_os'] = host_os + end + + def test_linux_memory_used + host_os = RbConfig::CONFIG['host_os'] + RbConfig::CONFIG['host_os'] = 'linux' + + subject = Instana::Backend::ProcessInfo.new(OpenStruct.new(rss: 1)) + assert_equal 4096, subject.memory_used + ensure + RbConfig::CONFIG['host_os'] = host_os + end end