Commit d0e5b36
committed
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.1 parent 8d1e003 commit d0e5b36
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6265 | 6265 | | |
6266 | 6266 | | |
6267 | 6267 | | |
6268 | | - | |
| 6268 | + | |
6269 | 6269 | | |
6270 | 6270 | | |
6271 | 6271 | | |
| |||
| 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