Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_upload_from_file_w_bound_client_multipart fails on Windows #1434

Closed
dhermes opened this issue Jan 30, 2016 · 8 comments
Closed

test_upload_from_file_w_bound_client_multipart fails on Windows #1434

dhermes opened this issue Jan 30, 2016 · 8 comments
Assignees
Labels
api: pubsub Issues related to the Pub/Sub API. testing

Comments

@dhermes
Copy link
Contributor

dhermes commented Jan 30, 2016

Introduced in #1318

@tseaver
Copy link
Contributor

tseaver commented Jan 30, 2016

@dhermes The AppVeyor page for the failure shows just a couple of flickering blue dots (both FF and Chrome).

@dhermes
Copy link
Contributor Author

dhermes commented Jan 30, 2016

My original comment points to a broken build.

AssertionError: Lists differ: ['full_name,age,joined', '', 'Phred Phlynt[185 chars]27,'] != [u'full_name,age,joined', u'', u'Phred Phl[199 chars] u'']

Second list contains 1 additional elements.
First extra element 9:


- ['full_name,age,joined',
+ [u'full_name,age,joined',
?  +

-  '',
+  u'',
?  +

-  'Phred Phlyntstone,32,2015-07-24 19:53:19.006000+00:00',
+  u'Phred Phlyntstone,32,2015-07-24 19:53:19.006000+00:00',
?  +

-  '',
+  u'',
?  +

-  'Bharney Rhubble,33,2015-07-24 19:53:20.006000+00:00',
+  u'Bharney Rhubble,33,2015-07-24 19:53:20.006000+00:00',
?  +

-  '',
+  u'',
?  +

-  'Wylma Phlyntstone,29,2015-07-24 19:53:21.006000+00:00',
+  u'Wylma Phlyntstone,29,2015-07-24 19:53:21.006000+00:00',
?  +

-  '',
+  u'',
?  +

-  'Bhettye Rhubble,27,']
?                       ^

+  u'Bhettye Rhubble,27,',
?  +                     ^

+  u'']

@tseaver
Copy link
Contributor

tseaver commented Jan 30, 2016

Thanks for copying that in: I cannot see anything on the earlier AppVeyor build page, either (maybe a permissions issue?)

@tseaver
Copy link
Contributor

tseaver commented Jan 30, 2016

Can you post the name / line # of the failing testcase?

@dhermes
Copy link
Contributor Author

dhermes commented Jan 30, 2016

Not sure why you can't see it, I checked in an incognito Window and see it just is

The name of the failing test is test_upload_from_file_w_bound_client_multipart (in the name of this issue, and in my original comment).

======================================================================
FAIL: test_upload_from_file_w_bound_client_multipart (gcloud.bigquery.test_table.TestTable)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\projects\gcloud-python\gcloud\bigquery\test_table.py", line 1403, in test_upload_from_file_w_bound_client_multipart
    self.assertEqual(payload_lines, body_lines)

@ghost
Copy link

ghost commented Feb 12, 2016

There are two different problems in this test case.

  1. Currently the test case decodes request body into unicode, then comparing with the result from standard library mime parser. According to the Appveyor output and local test running, parser payloads seem to have different data type among different platforms. This affects Python 2.x.
  2. There is a trailing newline in the request body while parser payload is not. This affects both Python 2.x and Python 3.x.

@ghost
Copy link

ghost commented Feb 12, 2016

My questions are:

  1. Is it reasonable to validate HTTP request using email document parser?
  2. Will adding external library for validating HTTP request format help this situation? I cannot find any out-of-box Python support for this task.

@dhermes
Copy link
Contributor Author

dhermes commented Feb 12, 2016

Thanks for tackling this! The reason we use the email parser is because multi-part HTTP requests conform to formats supported in that library. We don't need another library to handle a trailing newline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. testing
Projects
None yet
Development

No branches or pull requests

2 participants