private async waitForDeletion()

in src/integrationtest/TestUtils.ts [112:131]


    private async waitForDeletion(): Promise<void> {
        console.log("Waiting for the ledger to be deleted...");
        const request: DescribeLedgerRequest = {
            Name: this.ledgerName
        };
        while (true) {
            try {
                await this.qldbClient.describeLedger(request).promise();
                console.log("The ledger is still being deleted. Please wait...");
                await TestUtils.sleep(10000);
            } catch (e) {
                if (isResourceNotFoundException(e)) {
                    console.log("Success. Ledger is deleted.");
                    break;
                } else {
                    throw e;
                }
            }
        }
    }