diff --git a/src/HavenoClient.test.ts b/src/HavenoClient.test.ts index 685358b0..057a39af 100644 --- a/src/HavenoClient.test.ts +++ b/src/HavenoClient.test.ts @@ -434,21 +434,20 @@ test("Can manage an account (CI)", async () => { stream.end(); assert(size > 0); - // delete account which shuts down server - await user3.deleteAccount(); // TODO: support deleting and restoring account without shutting down server, #310 - assert(!await user3.isConnectedToDaemon()); - await releaseHavenoProcess(user3); + // delete account + await user3.deleteAccount(); + do { await wait(1000); } + while(!await user3.isConnectedToDaemon()); + assert(!await user3.accountExists()); - // restore account which shuts down server - user3 = await initHaveno(user3Config); + // restore account const zipBytes: Uint8Array = new Uint8Array(fs.readFileSync(zipFile)); await user3.restoreAccount(zipBytes); - assert(!await user3.isConnectedToDaemon()); - await releaseHavenoProcess(user3); + do { await wait(1000); } + while(!await user3.isConnectedToDaemon()); + assert(await user3.accountExists()); // open restored account - user3 = await initHaveno(user3Config); - assert(await user3.accountExists()); await user3.openAccount(password); assert(await user3.isAccountOpen()); diff --git a/src/HavenoClient.ts b/src/HavenoClient.ts index e8d5824d..306d29bd 100644 --- a/src/HavenoClient.ts +++ b/src/HavenoClient.ts @@ -356,7 +356,7 @@ export default class HavenoClient { } /** - * Permanently delete the Haveno account and shutdown the server. // TODO: possible to not shutdown server? + * Permanently delete the Haveno account. */ async deleteAccount(): Promise { try {