Skip to content

Add default pollSettings config functions#36706

Merged
vdemeester merged 2 commits intomoby:masterfrom
arm64b:add-defult-timeout-config-func
Mar 30, 2018
Merged

Add default pollSettings config functions#36706
vdemeester merged 2 commits intomoby:masterfrom
arm64b:add-defult-timeout-config-func

Conversation

@arm64b
Copy link
Copy Markdown
Contributor

@arm64b arm64b commented Mar 27, 2018

This PR will:

  1. Add the default function per resource to override the pollSettings which will be re-used where it's needed, this will avoid to configure the timeout value each time.
  2. Remove all the previous timeout value adjustment codes, replace them with the new added default function in above item 1.

- What I did
Override the timeout value for some time-consuming test cases.
- How I did it
Add default function to override the timeout value per resource, and reuse it where it's needed.
- How to verify it
make test-integration
- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@arm64b
Copy link
Copy Markdown
Contributor Author

arm64b commented Mar 27, 2018

also @dnephin and @thaJeztah 😸 ...

@arm64b
Copy link
Copy Markdown
Contributor Author

arm64b commented Mar 27, 2018

Hello @vdemeester , would you pls help to rebuild the failure nodes? Thanks! 🐅

Comment thread integration/internal/swarm/service.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we don’t have tests that already set a longer timeout? Otherwise we may have to check first if the existing timeout is longer

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default timeout value is 10s configured in the 3rd party code github.com/gotestyourself/gotestyourself/poll/poll.go, for each poll.WaitOn() calling, we can override the timeout value with the default function defined here. On Arm platforms, for those multiple-service creation, the 1min value is reasonable and the CI can pass all the test cases. Let me know if any suggestions 😄

Copy link
Copy Markdown
Member

@dnephin dnephin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! this is looking good

Comment thread integration/internal/swarm/service.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we have any async image operations, so we won't need this one.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review 👍 ! I will remove it in the update, even we need this one in the future, I think it will be easy to extend this idea.

Comment thread integration/internal/swarm/service.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we have any async plugin operations, so we won't need this one.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Comment thread integration/internal/swarm/service.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we have any async volume operations, so we won't need this one.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Comment thread integration/network/service_test.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are waiting on services, so shouldn't it use ServicePoll?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I'll correct it.

@arm64b arm64b force-pushed the add-defult-timeout-config-func branch from a430d37 to a742046 Compare March 28, 2018 02:00
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 28, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@f125748). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master   #36706   +/-   ##
=========================================
  Coverage          ?      35%           
=========================================
  Files             ?      613           
  Lines             ?    45797           
  Branches          ?        0           
=========================================
  Hits              ?    16030           
  Misses            ?    27675           
  Partials          ?     2092

Copy link
Copy Markdown
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🐯

@arm64b
Copy link
Copy Markdown
Contributor Author

arm64b commented Mar 28, 2018

Hello @vdemeester , thanks for the quick response! Seems the experimental hasn't been in rebuild state...

@arm64b
Copy link
Copy Markdown
Contributor Author

arm64b commented Mar 29, 2018

ping @dnephin , @thaJeztah , PTAL?

Comment thread integration/network/service_test.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many of these are waiting on service state, so they should use ServicePoll.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

arm64b added 2 commits March 29, 2018 04:47
Add the default function per resource to override the `pollSettings`
which will be re-used where it's needed.

Signed-off-by: Dennis Chen <[email protected]>
Using the default PollSettings functions to adjust the timeout
value instead of changing the value each time when needed.

Signed-off-by: Dennis Chen <[email protected]>
@arm64b
Copy link
Copy Markdown
Contributor Author

arm64b commented Mar 30, 2018

Hello @dnephin , kindly PTAL again after the change according to your comments ❓

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants