Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(util-waiter): expose minDelay and maxDelay for waiters #1839

Merged
merged 6 commits into from
Jan 5, 2021

Conversation

alexforsyth
Copy link
Contributor

@alexforsyth alexforsyth commented Dec 23, 2020

Issue #, if available:

Description of changes:
Expose the options for minDelay and maxDelay through typescript

import { DynamoDBClient, waitForTableExists } from "@aws-sdk/client-dynamodb"

(async () => {
    const TableName = "MY-TEST-TABLE-1";
  
    const maxWaitTime = 120;
    const client: DynamoDBClient = new DynamoDBClient({});
    let result = await waitForTableExists( { 
        client,
        minDelay: 20,
        maxDelay: 80,
        maxWaitTime: 25 } , { TableName });
    console.log("Table exists", result);
  })();
  

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Resolves: #1806

@alexforsyth alexforsyth changed the title fix(util-waiter): expose minwait fix(util-waiter): expose minDelay and maxDelay for waiters Dec 23, 2020
@codecov-io
Copy link

codecov-io commented Dec 23, 2020

Codecov Report

Merging #1839 (ca7b5db) into master (f2a47e8) will increase coverage by 0.00%.
The diff coverage is 84.21%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1839   +/-   ##
=======================================
  Coverage   79.30%   79.31%           
=======================================
  Files         368      368           
  Lines       15132    15146   +14     
  Branches     3222     3229    +7     
=======================================
+ Hits        12001    12013   +12     
- Misses       3131     3133    +2     
Impacted Files Coverage Δ
packages/util-waiter/src/waiter.ts 100.00% <ø> (ø)
...middleware-user-agent/src/user-agent-middleware.ts 93.10% <66.66%> (ø)
packages/util-waiter/src/utils/validate.ts 81.81% <77.77%> (-18.19%) ⬇️
packages/invalid-dependency/src/invalidProvider.ts 100.00% <100.00%> (ø)
packages/util-waiter/src/createWaiter.ts 100.00% <100.00%> (+11.76%) ⬆️
packages/util-waiter/src/poller.ts 100.00% <100.00%> (ø)
protocol_tests/aws-json/endpoints.ts 81.48% <100.00%> (ø)
lib/storage/src/data-chunk/readable-helper.ts 88.23% <0.00%> (-4.08%) ⬇️
protocol_tests/aws-ec2/endpoints.ts 81.48% <0.00%> (ø)
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bc79ab5...ca7b5db. Read the comment docs.

packages/util-waiter/src/waiter.ts Outdated Show resolved Hide resolved
@alexforsyth alexforsyth merged commit 25cb359 into aws:master Jan 5, 2021
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants