in src/integrationtest/TestUtils.ts [68:82]
async waitForActive(): Promise<void> {
console.log(`Waiting for ledger ${this.ledgerName} to become active...`);
const request: DescribeLedgerRequest = {
Name: this.ledgerName
}
while (true) {
const result: DescribeLedgerResponse = await this.qldbClient.describeLedger(request).promise();
if (result.State === "ACTIVE") {
console.log("Success. Ledger is active and ready to be used.");
return;
}
console.log("The ledger is still creating. Please wait...");
await TestUtils.sleep(10000);
}
}