tarantool / nginx_upstream_module

Tarantool NginX upstream module (REST, JSON API, websockets, load balancing)
Other
174 stars 18 forks source link

Fix tests #141

Closed romanhabibov closed 3 years ago

romanhabibov commented 3 years ago

Hi! Thank you for the patchset. See several comments below:

  • In "test/ngx_confs/nginx.dev.conf" events have the following configuration: {worker_connections 4000; multi_accept on;}. In this case I get the error: "nginx: [emerg] the maximum number of files supported by select() is 1024". The cause of the problem is an attempt to use the select() by default. I see two variants for fixes: add use poll; or update the value of worker_connections to < 1024.

Fixed.

  • Tests "./test/v24_features.py" and "./test/v26_features.py" now fail.

Sorry, I can't fix it now. They don't fail on my Mac. I think the problem is in python's http_utils lib version.

I think that the failed tests must be commented and corresponding tickets should be created.

┌─[✗]─[leonid@vasya-L460]─[~/work/mail/nginx_upstream_module]
└──╼ ./test/v24_features.py 
[+] Post/Put body
[+] Post body - error
[+] Body sould not pass
[+] Headers out
[+] Unescape issue
Traceback (most recent call last):
File "/home/leonid/work/mail/nginx_upstream_module/test/http_utils.py", line 223, in get
  res = urllib2.urlopen(req)
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
  return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 429, in open
  response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 447, in _open
  '_open', req)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
  result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1235, in http_open
  return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1202, in do_open
  h.request(req.get_method(), req.get_selector(), req.data, headers)
File "/usr/lib/python2.7/httplib.py", line 1103, in request
  self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1137, in _send_request
  self.putrequest(method, url, **skips)
File "/usr/lib/python2.7/httplib.py", line 968, in putrequest
  % (url, match.group()))
InvalidURL: URL can't contain control characters. '/unescape?a=some string with spaces' (found at least ' ')

Traceback (most recent call last):
File "./test/v24_features.py", line 46, in <module>
  result = get_success(preset_method_location, None, {})
File "/home/leonid/work/mail/nginx_upstream_module/test/http_utils.py", line 259, in get_success
  assert(code == 200), 'expected 200'
AssertionError: expected 200
┌─[✗]─[leonid@vasya-L460]─[~/work/mail/nginx_upstream_module]
└──╼ ./test/v26_features.py 
[+] basic insert
Traceback (most recent call last):
File "/home/leonid/work/mail/nginx_upstream_module/test/http_utils.py", line 223, in get
  res = urllib2.urlopen(req)
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
  return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 429, in open
  response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 447, in _open
  '_open', req)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
  result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1235, in http_open
  return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1202, in do_open
  h.request(req.get_method(), req.get_selector(), req.data, headers)
File "/usr/lib/python2.7/httplib.py", line 1103, in request
  self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1137, in _send_request
  self.putrequest(method, url, **skips)
File "/usr/lib/python2.7/httplib.py", line 968, in putrequest
  % (url, match.group()))
InvalidURL: URL can't contain control characters. '/insert?index=1&string=some big string&float=2.1&double=3.1&bool=True&int=-1000&' (found at least ' ')

Traceback (most recent call last):
File "./test/v26_features.py", line 34, in <module>
  result = get_success(BASE_URL + '/insert', insert_1, None)
File "/home/leonid/work/mail/nginx_upstream_module/test/http_utils.py", line 259, in get_success
  assert(code == 200), 'expected 200'
AssertionError: expected 200
  • When I use test/auto.sh it exits with
[+] Test - OK
+ for build_type in configure-for-testing configure
+ rm -f nginx/obj/nginx
+ make configure
make: *** No rule to make target 'configure'.  Stop.

and it doesn't seem like a good ending. Do you have the same problem?

Fixed.

  • Please use a more detailed description of the problem in commit message for patch "Refix #120". First of all "Refix ..." doesn't seem like a good title. You are not revert the entire commit, you are just fixing some part of it. Why are this changes "unjustified"? Write the reason.

In fact, these changes just revert one line patch and make the test of this patch failing.

Second: "Did I understand correctly from you conversation with Turenko that we already have a test for this change, and test was failed before your changes?"

Yes, we have. See patch

  • Use branch naming according to SOP.
Totktonada commented 3 years ago

Chug-chug!