{"action":"opened","issue":{"url":"https://api.github.com/repos/locustio/locust/issues/637","repository_url":"https://api.github.com/repos/locustio/locust","labels_url":"https://api.github.com/repos/locustio/locust/issues/637/labels{/name}","comments_url":"https://api.github.com/repos/locustio/locust/issues/637/comments","events_url":"https://api.github.com/repos/locustio/locust/issues/637/events","html_url":"https://github.com/locustio/locust/issues/637","id":246340277,"number":637,"title":"make test is failing on 0.7 tags due to Flask 0.12","user":{"login":"AmineChikhaoui","id":5149377,"avatar_url":"https://avatars1.githubusercontent.com/u/5149377?v=4","gravatar_id":"","url":"https://api.github.com/users/AmineChikhaoui","html_url":"https://github.com/AmineChikhaoui","followers_url":"https://api.github.com/users/AmineChikhaoui/followers","following_url":"https://api.github.com/users/AmineChikhaoui/following{/other_user}","gists_url":"https://api.github.com/users/AmineChikhaoui/gists{/gist_id}","starred_url":"https://api.github.com/users/AmineChikhaoui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmineChikhaoui/subscriptions","organizations_url":"https://api.github.com/users/AmineChikhaoui/orgs","repos_url":"https://api.github.com/users/AmineChikhaoui/repos","events_url":"https://api.github.com/users/AmineChikhaoui/events{/privacy}","received_events_url":"https://api.github.com/users/AmineChikhaoui/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-28T12:58:57Z","updated_at":"2017-07-28T12:58:57Z","closed_at":null,"body":"running `make test` on all tags of version 0.7 fails during the tests due to the Flask version\r\nNote that setting Flask to 0.10.1 fixes the issue.\r\n```\r\ntest_wrong_url (locust.test.test_client.TestHttpSession) ... ok\r\n\r\n======================================================================\r\nFAIL: test_request_stats_no_content_length (locust.test.test_stats.TestRequestStatsWithWebserver)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/home/aminechikhaoui/work/locust/locust/test/test_stats.py\", line 136, in test_request_stats_no_content_length\r\n    self.assertEqual(global_stats.get(path, \"GET\").avg_content_length, len(\"This response does not have content-length in the header\"))\r\nAssertionError: 0 != 56\r\n\r\n----------------------------------------------------------------------\r\nRan 73 tests in 0.663s\r\n\r\nFAILED (failures=1)\r\nError in atexit._run_exitfuncs:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/atexit.py\", line 24, in _run_exitfuncs\r\n    func(*targs, **kargs)\r\n  File \"/usr/lib/python2.7/logging/__init__.py\", line 1653, in shutdown\r\n    h.flush()\r\n  File \"/usr/lib/python2.7/logging/__init__.py\", line 834, in flush\r\n    if self.stream and hasattr(self.stream, \"flush\"):\r\n  File \"/home/aminechikhaoui/work/locust/.eggs/Werkzeug-0.12.2-py2.7.egg/werkzeug/local.py\", line 328, in __bool__\r\n    return bool(self._get_current_object())\r\n  File \"/home/aminechikhaoui/work/locust/.eggs/Werkzeug-0.12.2-py2.7.egg/werkzeug/local.py\", line 306, in _get_current_object\r\n    return self.__local()\r\n  File \"/usr/local/lib/python2.7/dist-packages/Flask-0.12.2-py2.7.egg/flask/logging.py\", line 37, in _proxy_stream\r\n    ctx = _request_ctx_stack.top\r\nAttributeError: 'NoneType' object has no attribute 'top'\r\nError in sys.exitfunc:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/atexit.py\", line 24, in _run_exitfuncs\r\n    func(*targs, **kargs)\r\n  File \"/usr/lib/python2.7/logging/__init__.py\", line 1653, in shutdown\r\n    h.flush()\r\n  File \"/usr/lib/python2.7/logging/__init__.py\", line 834, in flush\r\n    if self.stream and hasattr(self.stream, \"flush\"):\r\n  File \"/home/aminechikhaoui/work/locust/.eggs/Werkzeug-0.12.2-py2.7.egg/werkzeug/local.py\", line 328, in __bool__\r\n    return bool(self._get_current_object())\r\n  File \"/home/aminechikhaoui/work/locust/.eggs/Werkzeug-0.12.2-py2.7.egg/werkzeug/local.py\", line 306, in _get_current_object\r\n    return self.__local()\r\n  File \"/usr/local/lib/python2.7/dist-packages/Flask-0.12.2-py2.7.egg/flask/logging.py\", line 37, in _proxy_stream\r\n    ctx = _request_ctx_stack.top\r\nAttributeError: 'NoneType' object has no attribute 'top'\r\nmake: *** [test] Error 1\r\n```\r\nRunning make test with flask=0.10.1:\r\n```\r\n$ git diff\r\ndiff --git a/setup.py b/setup.py\r\nindex 2b466db..8a07349 100644\r\n--- a/setup.py\r\n+++ b/setup.py\r\n@@ -44,7 +44,7 @@ setup(\r\n     packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),\r\n     include_package_data=True,\r\n     zip_safe=False,\r\n-    install_requires=[\"gevent>=1.0.1\", \"flask>=0.10.1\", \"requests>=2.4.1\", \"msgpack-python>=0.4.2\"],\r\n+    install_requires=[\"gevent>=1.0.1\", \"flask==0.10.1\", \"requests>=2.4.1\", \"msgpack-python>=0.4.2\"],\r\n     tests_require=['unittest2', 'mock', 'pyzmq'],\r\n     entry_points={\r\n         'console_scripts': [\r\n\r\naminechikhaoui at PDXL0711-LatE6530 in ~/work/locust\r\n$ sudo  make test                         \r\npython setup.py test\r\nrunning test\r\nSearching for flask==0.10.1\r\nBest match: Flask 0.10.1\r\nProcessing Flask-0.10.1-py2.7.egg\r\n\r\nUsing /home/aminechikhaoui/work/locust/.eggs/Flask-0.10.1-py2.7.egg\r\nSearching for gevent>=1.0.1\r\nBest match: gevent 1.2.2\r\nProcessing gevent-1.2.2-py2.7-linux-x86_64.egg\r\n\r\nUsing /home/aminechikhaoui/work/locust/.eggs/gevent-1.2.2-py2.7-linux-x86_64.egg\r\nSearching for itsdangerous>=0.21\r\nBest match: itsdangerous 0.24\r\nProcessing itsdangerous-0.24-py2.7.egg\r\n\r\nUsing /home/aminechikhaoui/work/locust/.eggs/itsdangerous-0.24-py2.7.egg\r\nSearching for Werkzeug>=0.7\r\nBest match: Werkzeug 0.12.2\r\nProcessing Werkzeug-0.12.2-py2.7.egg\r\n\r\nUsing /home/aminechikhaoui/work/locust/.eggs/Werkzeug-0.12.2-py2.7.egg\r\nSearching for greenlet>=0.4.10\r\nBest match: greenlet 0.4.12\r\nProcessing greenlet-0.4.12-py2.7-linux-x86_64.egg\r\n\r\nUsing /home/aminechikhaoui/work/locust/.eggs/greenlet-0.4.12-py2.7-linux-x86_64.egg\r\nSearching for pyzmq\r\nBest match: pyzmq 16.0.2\r\nProcessing pyzmq-16.0.2-py2.7-linux-x86_64.egg\r\n\r\nUsing /home/aminechikhaoui/work/locust/.eggs/pyzmq-16.0.2-py2.7-linux-x86_64.egg\r\nSearching for mock\r\nBest match: mock 2.0.0\r\nProcessing mock-2.0.0-py2.7.egg\r\n\r\nUsing /home/aminechikhaoui/work/locust/.eggs/mock-2.0.0-py2.7.egg\r\nSearching for pbr>=0.11\r\nBest match: pbr 3.1.1\r\nProcessing pbr-3.1.1-py2.7.egg\r\n\r\nUsing /home/aminechikhaoui/work/locust/.eggs/pbr-3.1.1-py2.7.egg\r\nSearching for funcsigs>=1\r\nBest match: funcsigs 1.0.2\r\nProcessing funcsigs-1.0.2-py2.7.egg\r\n\r\nUsing /home/aminechikhaoui/work/locust/.eggs/funcsigs-1.0.2-py2.7.egg\r\nrunning egg_info\r\nwriting requirements to locustio.egg-info/requires.txt\r\nwriting locustio.egg-info/PKG-INFO\r\nwriting top-level names to locustio.egg-info/top_level.txt\r\nwriting dependency_links to locustio.egg-info/dependency_links.txt\r\nwriting entry points to locustio.egg-info/entry_points.txt\r\nreading manifest file 'locustio.egg-info/SOURCES.txt'\r\nreading manifest template 'MANIFEST.in'\r\nwriting manifest file 'locustio.egg-info/SOURCES.txt'\r\nrunning build_ext\r\ntest_task_ratio_command (locust.test.test_taskratio.TestTaskRatio) ... ok\r\ntest_task_ratio_command_with_locust_weight (locust.test.test_taskratio.TestTaskRatio) ... ok\r\ntest_get_task_ratio_dict_relative (locust.test.test_stats.TestInspectLocust) ... ok\r\ntest_get_task_ratio_dict_total (locust.test.test_stats.TestInspectLocust) ... ok\r\ntest_aggregation (locust.test.test_stats.TestRequestStats) ... ok\r\ntest_avg (locust.test.test_stats.TestRequestStats) ... ok\r\ntest_current_rps (locust.test.test_stats.TestRequestStats) ... ok\r\ntest_median (locust.test.test_stats.TestRequestStats) ... ok\r\ntest_num_reqs_fails (locust.test.test_stats.TestRequestStats) ... ok\r\ntest_percentile (locust.test.test_stats.TestRequestStats) ... ok\r\ntest_reset (locust.test.test_stats.TestRequestStats) ... ok\r\ntest_reset_min_response_time (locust.test.test_stats.TestRequestStats) ... ok\r\ntest_serialize_through_message (locust.test.test_stats.TestRequestStats) ... ok\r\ntest_total_rps (locust.test.test_stats.TestRequestStats) ... ok\r\ntest_max_requests (locust.test.test_stats.TestRequestStatsWithWebserver) ... ok\r\ntest_max_requests_failed_requests (locust.test.test_stats.TestRequestStatsWithWebserver) ... ok\r\ntest_request_connection_error (locust.test.test_stats.TestRequestStatsWithWebserver) ... ok\r\ntest_request_stats_content_length (locust.test.test_stats.TestRequestStatsWithWebserver) ... ok\r\ntest_request_stats_named_endpoint (locust.test.test_stats.TestRequestStatsWithWebserver) ... ok\r\ntest_request_stats_no_content_length (locust.test.test_stats.TestRequestStatsWithWebserver) ... ok\r\ntest_request_stats_no_content_length_streaming (locust.test.test_stats.TestRequestStatsWithWebserver) ... ok\r\ntest_request_stats_query_variables (locust.test.test_stats.TestRequestStatsWithWebserver) ... ok\r\ntest_catch_response (locust.test.test_locust_class.TestCatchResponse) ... ok\r\ntest_catch_response_allow_404 (locust.test.test_locust_class.TestCatchResponse) ... ok\r\ntest_catch_response_connection_error_fail (locust.test.test_locust_class.TestCatchResponse) ... ok\r\ntest_catch_response_connection_error_success (locust.test.test_locust_class.TestCatchResponse) ... ok\r\ntest_catch_response_http_fail (locust.test.test_locust_class.TestCatchResponse) ... ok\r\ntest_catch_response_http_manual_fail (locust.test.test_locust_class.TestCatchResponse) ... ok\r\ntest_catch_response_http_manual_success (locust.test.test_locust_class.TestCatchResponse) ... ok\r\ntest_interrupt_taskset_with_catch_response (locust.test.test_locust_class.TestCatchResponse) ... ok\r\ntest_interrupt_taskset_in_main_taskset (locust.test.test_locust_class.TestTaskSet) ... ok\r\ntest_on_start (locust.test.test_locust_class.TestTaskSet) ... ok\r\ntest_on_start_interrupt (locust.test.test_locust_class.TestTaskSet) ... ok\r\ntest_parent_attribute (locust.test.test_locust_class.TestTaskSet) ... ok\r\ntest_schedule_task (locust.test.test_locust_class.TestTaskSet) ... ok\r\ntest_schedule_task_bound_method (locust.test.test_locust_class.TestTaskSet) ... ok\r\ntest_schedule_task_with_kwargs (locust.test.test_locust_class.TestTaskSet) ... ok\r\ntest_sub_taskset (locust.test.test_locust_class.TestTaskSet) ... ok\r\ntest_sub_taskset_arguments (locust.test.test_locust_class.TestTaskSet) ... ok\r\ntest_sub_taskset_tasks_decorator (locust.test.test_locust_class.TestTaskSet) ... ok\r\ntest_task_decorator_ratio (locust.test.test_locust_class.TestTaskSet) ... ok\r\ntest_task_decorator_with_or_without_argument (locust.test.test_locust_class.TestTaskSet) ... ok\r\ntest_task_ratio (locust.test.test_locust_class.TestTaskSet) ... ok\r\ntest_taskset_inheritance (locust.test.test_locust_class.TestTaskSet) ... ok\r\ntest_client_basic_auth (locust.test.test_locust_class.TestWebLocustClass) ... ok\r\ntest_client_delete (locust.test.test_locust_class.TestWebLocustClass) ... ok\r\ntest_client_get (locust.test.test_locust_class.TestWebLocustClass) ... ok\r\ntest_client_get_absolute_url (locust.test.test_locust_class.TestWebLocustClass) ... ok\r\ntest_client_head (locust.test.test_locust_class.TestWebLocustClass) ... ok\r\ntest_client_post (locust.test.test_locust_class.TestWebLocustClass) ... ok\r\ntest_client_put (locust.test.test_locust_class.TestWebLocustClass) ... ok\r\ntest_client_request_headers (locust.test.test_locust_class.TestWebLocustClass) ... ok\r\ntest_get_request (locust.test.test_locust_class.TestWebLocustClass) ... ok\r\ntest_locust_client_error (locust.test.test_locust_class.TestWebLocustClass) ... ok\r\ntest_log_request_name_argument (locust.test.test_locust_class.TestWebLocustClass) ... ok\r\ntest_redirect_url_original_path_as_name (locust.test.test_locust_class.TestWebLocustClass) ... ok\r\ntest_exception_in_task (locust.test.test_runners.TestMasterRunner) ... ok\r\ntest_exception_is_catched (locust.test.test_runners.TestMasterRunner)\r\nTest that exceptions are stored, and execution continues ... ok\r\ntest_slave_connect (locust.test.test_runners.TestMasterRunner) ... ok\r\ntest_slave_stats_report_median (locust.test.test_runners.TestMasterRunner) ... ok\r\ntest_spawn_fewer_locusts_than_slaves (locust.test.test_runners.TestMasterRunner) ... ok\r\ntest_spawn_uneven_locusts (locust.test.test_runners.TestMasterRunner) ... ok\r\ntest_spawn_zero_locusts (locust.test.test_runners.TestMasterRunner) ... ok\r\ntest_message_serialize (locust.test.test_runners.TestMessageSerializing) ... ok\r\ntest_distribution_stats_csv (locust.test.test_web.TestWebUI) ... ok\r\ntest_index (locust.test.test_web.TestWebUI) ... ok\r\ntest_request_stats_csv (locust.test.test_web.TestWebUI) ... ok\r\ntest_stats (locust.test.test_web.TestWebUI) ... ok\r\ntest_stats_cache (locust.test.test_web.TestWebUI) ... ok\r\ntest_stats_no_data (locust.test.test_web.TestWebUI) ... ok\r\ntest_is_locust (locust.test.test_main.TestTaskSet) ... ok\r\ntest_connection_error (locust.test.test_client.TestHttpSession) ... ok\r\ntest_get (locust.test.test_client.TestHttpSession) ... ok\r\ntest_slow_redirect (locust.test.test_client.TestHttpSession) ... ok\r\ntest_streaming_response (locust.test.test_client.TestHttpSession) ... ok\r\ntest_wrong_url (locust.test.test_client.TestHttpSession) ... ok\r\n\r\n----------------------------------------------------------------------\r\nRan 76 tests in 2.639s\r\n\r\nOK\r\n```"}}
{"actor":{"display_login":"AmineChikhaoui"}}