devtools/testlib.py
branchstable
changeset 5751 1e5ef464cade
parent 5426 0d4853a6e5ee
child 5752 b0bb553e3be4
child 5778 1a4ac9e2ce63
equal deleted inserted replaced
5750:b3bc214cd479 5751:1e5ef464cade
    81         protected_entities = yams.schema.BASE_TYPES.union(SYSTEM_ENTITIES)
    81         protected_entities = yams.schema.BASE_TYPES.union(SYSTEM_ENTITIES)
    82     return set(schema.entities()) - protected_entities
    82     return set(schema.entities()) - protected_entities
    83 
    83 
    84 
    84 
    85 def refresh_repo(repo, resetschema=False, resetvreg=False):
    85 def refresh_repo(repo, resetschema=False, resetvreg=False):
       
    86     for pool in repo.pools:
       
    87         pool.close(True)
       
    88     repo.system_source.shutdown()
    86     devtools.reset_test_database(repo.config)
    89     devtools.reset_test_database(repo.config)
    87     for pool in repo.pools:
    90     for pool in repo.pools:
    88         pool.reconnect()
    91         pool.reconnect()
    89     repo._type_source_cache = {}
    92     repo._type_source_cache = {}
    90     repo._extid_cache = {}
    93     repo._extid_cache = {}