示例#1
0
 def test_heap_dump_tmp(self):
     settings = Settings({"heap_dump": "tmp"})
     strategy = PercentStrategy("blitz", settings)
     hd = strategy.get_heap_dump()
     append = strategy.get_append()
     assert " " not in hd
     assert "HeapDumpPath" not in hd
     assert "HeapDumpPath" in "".join(append)
示例#2
0
 def test_heap_dump_on(self):
     settings = Settings({"heap_dump": "on"})
     strategy = PercentStrategy("blitz", settings)
     hd = strategy.get_heap_dump()
     append = strategy.get_append()
     assert " " not in hd
     assert "HeapDumpPath" not in hd
     assert not append
示例#3
0
 def test_defaults(self):
     s = Settings({}, {
         "perm_gen": "xxx",
         "heap_dump": "yyy",
         "heap_size": "zzz",
     })
     assert s.perm_gen == "xxx"
     assert s.heap_dump == "yyy"
     assert s.heap_size == "zzz"
示例#4
0
 def test_explicit(self):
     s = Settings({
         "perm_gen": "xxx",
         "heap_dump": "yyy",
         "heap_size": "zzz",
     })
     assert s.perm_gen == "xxx"
     assert s.heap_dump == "yyy"
     assert s.heap_size == "zzz"
示例#5
0
 def test_both(self):
     s = Settings({
         "perm_gen": "aaa",
         "heap_dump": "bbb",
         "heap_size": "ccc",
         }, {
         "perm_gen": "xxx",
         "heap_dump": "yyy",
         "heap_size": "zzz",
         })
     assert s.perm_gen == "aaa"
     assert s.heap_dump == "bbb"
     assert s.heap_size == "ccc"
示例#6
0
 def test_initial(self):
     s = Settings()
     assert s.perm_gen == "128m"
     assert s.heap_dump == "off"
     assert s.heap_size == "512m"