Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

travis tests have been failing for a while #323

Closed
aisch opened this issue May 13, 2016 · 10 comments
Closed

travis tests have been failing for a while #323

aisch opened this issue May 13, 2016 · 10 comments
Labels

Comments

@aisch
Copy link

aisch commented May 13, 2016

seems since ~ https://travis-ci.org/influxdata/influxdb-python/builds/116902069

@aviau aviau added the bug label Jun 9, 2016
@aviau
Copy link
Collaborator

aviau commented Jun 9, 2016

We should fix this ASAP before merging new things.

@wwentland
Copy link
Contributor

wwentland commented Jun 9, 2016

@aviau A lot of these tests seem to fail as points are now unicode strings rather than str and should be fairly straightforward to adapt.

Do you know what might have introduced this change or why the tests worked before?

@aviau
Copy link
Collaborator

aviau commented Jun 9, 2016

Adapting the tests is fine as long as they show that the library works ;)

Thank you for taking this on. As I have written in the README recently, this library needs some love and I am very busy. Should anyone contribute enough, I would gladly invite him as a co-maintainer.

@wwentland
Copy link
Contributor

wwentland commented Jun 9, 2016

Well, I am not a huge fan of simply adapting the test suite so that the tests pass. Something must have triggered the type change and in some tests types seem to be inconsistent.

See, for example, the following:

======================================================================
FAIL: test_get_list_series_and_delete (influxdb.tests.server_tests.client_test_with_server.CommonTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/babilen/src/github.com/influxdb/influxdb-python/influxdb/tests/server_tests/client_test_with_server.py", line 480, in test_get_list_series_and_delete
    rsp
AssertionError: Lists differ: [{'name': 'cpu_load_short', 't... != [{'name': 'results', 'tags': [...

First differing element 0:
{'name': 'cpu_load_short', 'tags': [{'_key': 'cpu_load_short,host=server01,region=us-west', 'host': 'server01', 'region': 'us-west'}]}
{'name': 'results', 'tags': [{u'key': u'cpu_load_short,host=server01,region=us-west'}]}

- [{'name': 'cpu_load_short',
+ [{'name': 'results',
-   'tags': [{'_key': 'cpu_load_short,host=server01,region=us-west',
?              -                                                   ^

+   'tags': [{u'key': u'cpu_load_short,host=server01,region=us-west'}]}]
?             +       +                                             ^^^^

-             'host': 'server01',
-             'region': 'us-west'}]}]
-------------------- >> begin captured logging << --------------------
requests.packages.urllib3.connectionpool: DEBUG: "GET /query?db=db&q=CREATE+DATABASE+%22db%22 HTTP/1.1" 200 40
requests.packages.urllib3.connectionpool: DEBUG: "POST /write?db=db HTTP/1.1" 204 0
requests.packages.urllib3.connectionpool: DEBUG: "GET /query?db=db&q=SHOW+SERIES HTTP/1.1" 200 116
--------------------- >> end captured logging << ---------------------

where we see a mixture of unicode and str.

It appears as if points and tags are now returned as unicode, but I am not sure why or if this is the behaviour we want. The inconsistency is, however, rather suboptimal.

@aviau
Copy link
Collaborator

aviau commented Jun 9, 2016

We should return unicode to the user everywhere if that is possible.

@wwentland
Copy link
Contributor

wwentland commented Jun 9, 2016

I agree. Do you have an idea why points and tags behave that way, while 'name': 'results', 'tags' in there do not?

@aviau
Copy link
Collaborator

aviau commented Jun 9, 2016

We probably create those keys in result_set.py.

@wwentland
Copy link
Contributor

wwentland commented Jun 11, 2016

Most problems stem from the upgrade to InfluxDB 0.12.1 and the resulting changes in 103c7dc -- https://travis-ci.org/influxdata/influxdb-python/builds/124653874

@wwentland
Copy link
Contributor

Updating to 0.13.0 lets test_issue_143 pass again due to influxdata/influxdb#6283

@aviau
Copy link
Collaborator

aviau commented Jun 13, 2016

Thanks to @BABILEN, the test suite was fixed!

@aviau aviau closed this as completed Jun 13, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants