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)
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
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"
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"
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"
def test_initial(self): s = Settings() assert s.perm_gen == "128m" assert s.heap_dump == "off" assert s.heap_size == "512m"