rynop / dynamodb-local

A wrapper for AWS DynamoDB Local, intended for use in testcases
MIT License
53 stars 30 forks source link

Wait till the database is ready before returning response? #52

Open paul-uz opened 8 months ago

paul-uz commented 8 months ago

I'm using this library in some vitest tests. I have it being launched before all tests, and then some tables are created. However, the script to create tables runs right after the launch command, at which point the database isn't actually ready to communicate with, it's just been launched.

Is there anyway to launch the database, but only have the Promise returned when the database is actually ready? Otherwise, I have to rely on a high number of connection retries for my DynamoDB client

rmemoria commented 4 months ago

+1