Commit 991d9aa
Add missing timeout when calling entity with timeout (#1311)
I found this issue while working on a Robottelo upgrade scenario
refactor. I found that a test syncing the RHEL 7 server RPMs repo was
consistently timing out after 300 seconds, though the
`enable_sync_redhat_repo` API factory method uses a timeout of 1500
seconds by default. Eventually, I found that
`nailgun.entity_mixins.call_entity_with_timeout()` was invoking the
entity callable without specifically passing the timeout. After the repo
sync was initiated, `nailgun.entity_mixins._poll_task()` was being
called with no timeout value specified, causing the `timeout` variable
to be set to the `TASK_TIMEOUT` constant defined in the entity_mixins
module, which has a value of 300 seconds. My repo sync was completing in
~360 seconds, so the test was consistently failing.
This PR adds a `timeout` keyword argument to the `entity_callable()` in
`call_entity_with_timeout()` and, in the repository `sync()` entity
method, changes the `timeout` argument in the call to
`_handle_response()` from a keywork argument to a positional argument.
(cherry picked from commit 62bee40)1 parent 1efcd75 commit 991d9aa
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6305 | 6305 | | |
6306 | 6306 | | |
6307 | 6307 | | |
6308 | | - | |
| 6308 | + | |
6309 | 6309 | | |
6310 | 6310 | | |
6311 | 6311 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
0 commit comments