jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1235838?usp=email )

Change subject: Tests: Improvements or workarounds for tests
......................................................................

Tests: Improvements or workarounds for tests

- enable minthrottle as float in config.py. This passes config variables
  type checking for int anf float both until T416145 is solved
- run windows tests with minthrottle of 0.5 i.e. of 120 calls p.m.
  to throttle read access due to 429 status code
- use timeout of 15s for script tests

Bug: T416145
Bug: T414170
Change-Id: I349ebe5fd9feea9e17c31f5e6b45dce7b7f64c3d
---
M .github/workflows/windows_tests.yml
M pywikibot/config.py
M tests/script_tests.py
3 files changed, 3 insertions(+), 3 deletions(-)

Approvals:
  jenkins-bot: Verified
  Xqt: Looks good to me, approved




diff --git a/.github/workflows/windows_tests.yml 
b/.github/workflows/windows_tests.yml
index af5916e..bb80f7a 100644
--- a/.github/workflows/windows_tests.yml
+++ b/.github/workflows/windows_tests.yml
@@ -62,7 +62,7 @@
           echo "maximum_GET_length = 5000" >> user-config.py
           echo "transliteration_target = None"  >> user-config.py
           echo "console_encoding = 'utf8'" >> user-config.py
-          echo "minthrottle = 1" >> user-config.py
+          echo "minthrottle = 0.5" >> user-config.py
           echo "import os" >> user-config.py
           echo "password_file = os.path.expanduser('passwordfile')" >> 
user-config.py
           echo "('${{ env.PYWIKIBOT_USERNAME }}', '${{ 
secrets.PYWIKIBOT_USERPWD }}')" > passwordfile
diff --git a/pywikibot/config.py b/pywikibot/config.py
index f44aeec..78c3fb0 100644
--- a/pywikibot/config.py
+++ b/pywikibot/config.py
@@ -709,7 +709,7 @@
 #
 # 'maxlag' is used to control the rate of server access (see below).
 # Set minthrottle to non-zero to use a throttle on read access.
-minthrottle = 0
+minthrottle = 0.0
 maxthrottle = 60

 # Slow down the robot such that it never makes a second page edit within
diff --git a/tests/script_tests.py b/tests/script_tests.py
index d138236..789f90c 100755
--- a/tests/script_tests.py
+++ b/tests/script_tests.py
@@ -218,7 +218,7 @@
                     do_timeout = self._timeout
                 else:
                     do_timeout = script_name in self._timeout
-                timeout = 10 if do_timeout else None
+                timeout = 15 if do_timeout else None

                 stdout, error = None, None
                 if self._results:

--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1235838?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I349ebe5fd9feea9e17c31f5e6b45dce7b7f64c3d
Gerrit-Change-Number: 1235838
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to