[devtools] qunit: use new async testing APIs
http://qunitjs.com/cookbook/#asynchronous-callbacks
QUnit keeps track of all the assert.async() objects created inside the
test functions and expects all done() functions to be called. Failure to
do so will result in the test being failed.
Unlike .start and .stop which were internal APIs, assert.async() is
stricter and fails tests if assert methods are used *after* all done()
functions are called (see "test callback execution order").
Related to #5533333.
helper = repo.system_source.dbhelper
sql('DROP INDEX entities_extid_idx')
sql(helper.sql_create_index('entities', 'extid', True))
sql('''
CREATE TABLE moved_entities (
eid INTEGER PRIMARY KEY NOT NULL,
extid VARCHAR(256) UNIQUE
)
''')
moved_entities = sql('SELECT -eid, extid FROM entities WHERE eid < 0')
cu = session.cnxset.cu
cu.executemany('INSERT INTO moved_entities (eid, extid) VALUES (%s, %s)',
moved_entities)
sql('DELETE FROM entities WHERE eid < 0')
commit()
sync_schema_props_perms('CWEType')
sync_schema_props_perms('cwuri')