You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
When using dynalite for testing I open a new dynalite for each test case and create new in memory tables.
asyncfunctionstartserver(){constserver=createServer({createTableMs: 0,deleteTableMs: 0,updateTableMs: 0})constport=awaitgetPortPromise()// `port-finder` is magic btwawaitnewPromise((resolve)=>server.listen(port,resolve))returnserver}
And then close it after each test case
async function stopServer(server) {
await new Promise((resolve, reject) => server.close(err => err ? reject(err) : resolve()))
}
However the close takes forever! So I often skip it and pray. But why does it take forever? I believe the AWS-SDK keeps the connection open. Since it's an http server you can actually close all connections which reduces the time to close to mere milliseconds.
Yeah, not a bug with this library, it’s an issue with how AWS folks changed the Node keepalive logic between v2 and v3. See: architect/functions@f80010f
Describe the issue
When using dynalite for testing I open a new dynalite for each test case and create new in memory tables.
And then close it after each test case
However the close takes forever! So I often skip it and pray. But why does it take forever? I believe the AWS-SDK keeps the connection open. Since it's an http server you can actually close all connections which reduces the time to close to mere milliseconds.
This isn't so much a bug as something people will run into so I wanted to document it.
The text was updated successfully, but these errors were encountered: