summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests: add uwsgi call in harakiri.pyRiccardo Magliocchetti2023-03-171-0/+1
| | | | So that it's trivial to run.
* core: add new flags for harakiri configuration:Filipe Niero Felisbino2023-03-171-0/+24
| | | | | | | - harakiri-graceful-timeout additional timeout for the worker to attempt a graceful shutdown. The application can catch the termination signal and perform an "emergency shutdown" - harakiri-graceful-signal determines which signal should be used (default SIGTERM) - harakiri-graceful-queue-threshold only triggers a harakiri if/when the listen queue crosses a threshold. Harakiri continues to be checked until the conditions are met - Changes are backwards compatible when the flags are not present
* ci: force installing sinatra 2Riccardo Magliocchetti2022-10-242-2/+2
| | | | | | Which still runs on ruby 2.5.0. Fix #2497
* ci: refactor tests to be run in parallelMRoci2022-09-214-0/+144
| | | | | | | | | | | | | | | | starting from `tests/travis.sh` subdivide test suites into: * `tests/gh-python.sh` * `tests/gh-deadlocks.sh` * `tests/gh-rack.sh` that share common variables and functions from `tests/gh-shared.sh` refactor github test workflow to use a multidimensional matrix in order to run each test suite (unittest, python, deadlocks) on each supported python version and rack tests on each supported rack version. closes https://github.com/unbit/uwsgi/issues/2479 leave `tests/travis.sh` because it can be useful as is somewhere else.
* Added a sleep to give uWSGI time to start (?)Florian Apolloner2022-04-041-0/+1
|
* fix(tests/deadlock): sleep before checking uwsgi processTahir H. Butt2022-03-221-0/+1
|
* fix(python-plugin): add uwsgi fork hooks to update internal interpreter stateTahir Butt2021-12-297-0/+7
|
* fix: add tests for python worker deadlocksTahir Butt2021-12-2310-2/+74
|
* tests: gem install with sudoRiccardo Magliocchetti2020-11-221-1/+1
| | | | As otherwise it would fail on github actions
* tests: make the tests CI config file a parameterRiccardo Magliocchetti2020-11-221-2/+3
| | | | So we don't need to duplicate it right now
* Merge pull request #2069 from awelzel/python-wsgi-file-wrapper-improvementsRoberto De Ioris2020-03-044-0/+124
|\ | | | | support io.BytesIO with wsgi.file_wrapper
| * python: support io.BytesIO with wsgi.file_wrapperArne Welzel2019-09-073-0/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Should solve #1126 This change proposes to move the `PyObject_AsFileDescriptor()` calls from the `wsgi.file_wrapper` into the response handler. In the response handler, we can sensibly fall back to the `read()` protocol using the existing `uwsgi_python_consume_file_wrapper_read()` if converting the file-like object to an fd fails. Previously, after the conversion to an fd failed, the `wsgi.file_wrapper` raised a SystemError. Running the added test application requires flask, start as follows: uwsgi --enable-threads --workers 1 --threads 1 \ --plugin ./python37_plugin.so --http-socket :5000 \ -H ./venv/ --wsgi-file ./tests/testfilewrapper.py $ for i in {1..3} ; do echo -n "test $i - "; curl localhost:5000/$i ; done test 1 - cookie test 2 - cookie test 3 - cookie2 $ for i in {1..3} ; do echo -n "test $i - "; curl localhost:5000/stream$i ; done test 1 - 0.10 cookie 0.20 cookie 0.30 cookie test 2 - cookie test 3 - cookie
| * rename tests/werkzeug.py to tests/werkzeug_app.pyArne Welzel2019-09-071-0/+0
| | | | | | | | ... flask doesn't like the fact that there's a werkzeug module.
* | tests/testrpc: appications must return an iterableArne Welzel2020-01-111-0/+2
| | | | | | | | | | Removes `TypeError: 'NoneType' object is not iterable` logs when running tests.
* | return register_rpc if name is >= UMAX8MRoci2019-10-252-1/+12
| |
* | testworkers: smoke check that uwsgi.workers() does in fact return somethingArne Welzel2019-09-031-2/+5
| |
* | travis.sh: allow for running multiple apps for testingArne Welzel2019-08-121-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | For each plugin, allow to run multiple apps instead of just the hard-coded tests/staticfile.py or examples/config2.ru apps. This helps to add tiny apps for very basic regression testing. Only a single request is made to / - the app should return 500 on error, 200 OK in the success case. NOTE: Anything more complicated would probably justify rewriting the whole script in Python.
* | tests: regression "test" for #2056Arne Welzel2019-08-121-0/+26
|/
* Merge pull request #1349 from Shir0kamii/feature/python-apiUnbit2018-06-072-0/+13
|\ | | | | Add bindings to the Python API
| * Add a test for the mule_file featureAlexandre Bonnetain2017-01-101-0/+3
| |
| * Add a test for the spooler_dir featureAlexandre Bonnetain2017-01-101-0/+10
| |
* | Remove redundant default open mode 'r' from Python codeJon Dufresne2018-01-023-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | In Python, open() opens files in read mode ('r') by default. Specifying it is unnecessary and simply adds noise. It is Pythonic to instead rely on this default value. See https://docs.python.org/3/library/functions.html#open > mode is an optional string that specifies the mode in which the file > is opened. It defaults to 'r' which means open for reading in text > mode.
* | Fix a few typos.Chris Faulkner2017-10-132-2/+2
| |
* | travis: bump ruby version for rack pluginRiccardo Magliocchetti2017-05-201-13/+3
| | | | | | | | | | As rack build fails with ruby < 2.2.2. While at it simplify ruby handling by using rvm.
* | else experimental implementation, #1485Unbit2017-03-251-0/+18
| |
* | Prefer https over httpJon Dufresne2016-12-151-1/+1
|/
* lua init steps and some websocket_handler addsDarvame2016-01-181-2/+2
|
* websockets_chat_async.lua test: missing 2th argDarvame Hleran2015-12-291-1/+1
| | | forgot about ping/pong, good game anyway
* websocket_handler() exampleDarvame Hleran2015-12-241-0/+108
|
* tests/rpc: fixup syntax for python3Riccardo Magliocchetti2015-12-011-2/+2
|
* misc: Eliminate blind exceptsJakub Stasiak2015-10-294-6/+6
| | | | | | | | | | The motivation is explained in 89b3840ab5fe2560a0801f6318dfdc54696bb1fd. * Where I was fairly certain what exception is expected I replaced "except:" with "except SomeConcreteClass:" (or otherwise simplified the code) * Where I wasn't sure what exaclty is being expected I just put "except Exception:" to at least skip the "special" exceptions
* Change `uwsgi.input_object()` to `uwsgi.request_context()`.yueyoum2015-07-281-4/+4
| | | | | and change the `uwsgi.websocket_send/send_binary/recv/recv_nb` keyword argument from `uwsgi_input` to `request_context`
* I add this feature for using uwsgi websocket with gevent more easy andyueyoum2015-07-281-0/+145
| | | | | | | | | | | | | | | | | | | | convenient. Example: tests/websockets_chat_2.py Add: add a new API `uwsgi.input_object()` for get `struct wsgi_req *` in python. Modify: `uwsgi.websocket_send/send_binary/recv/recv_nb` now has a kwarg: `uwsgi_input`. If not provide the `uwsgi_input` keyword argument, The four function's behavior not changed. When provide the `uwsgi_input` keyword argument, The four function will get `wsgi_req` from the argument. In this way, uwsgi websocket functions can be used in other greenlets.
* Tidy with flake8Curtis2015-04-1145-431/+530
|
* the asyncio plugin (experimental)Unbit2014-04-191-0/+140
|
* fixed a typoUnbit2014-04-111-1/+1
|
* fixed scripts/tests making use of dynamic optionsUnbit2013-12-261-12/+0
|
* fixed 2 typosUnbit2013-12-142-2/+2
|
* fixed #476 and #477Unbit2013-12-142-4/+67
|
* fixed stupid bug in websocket perl exampleUnbit2013-11-121-1/+1
|
* fixed comments in websockets_chat.plUnbit2013-11-121-1/+2
|
* added tests/websockets_chat.plUnbit2013-11-121-0/+128
|
* fixed websocket exampleunbit2013-10-181-1/+6
|
* fixed websocket example for python3unbit2013-10-181-4/+12
|
* fixed #99Unbit2013-09-192-0/+202
|
* mv againRoberto De Ioris2013-08-063-0/+177
|
* another series of mvRoberto De Ioris2013-08-061-0/+28
|
* moved example filesRoberto De Ioris2013-08-061-0/+17
|
* Convert tabs to spaces to fix indentation errorBrandon Stafford2013-07-221-17/+17
| | | The uwsgi.websocket_handshake call on line 52 was not indented properly, causing the Python interpreter to choke. Converting the few tabs sprinkled through the document to spaces fixes that error.
* another tests cleanupUnbit2013-06-151-0/+16
|