Пример #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"