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

multipart_upload_test fails #525

Closed
Waitak opened this issue Jan 6, 2020 · 6 comments
Closed

multipart_upload_test fails #525

Waitak opened this issue Jan 6, 2020 · 6 comments

Comments

@Waitak
Copy link
Contributor

Waitak commented Jan 6, 2020

Describe the bug
graphql/test/multipart_upload_test fails at line 161 because application/json is returned instead of multipart/form-data.

To Reproduce
Steps to reproduce the behavior:

  1. cd graphql-flutter/packages/graphql
  2. pub run test_coverage
  3. Interrupt as soon as .test_coverage.dart is generated.
  4. Run test manually using:
    dart --pause-isolates-on-exit \
    --enable_asserts \
    --enable-vm-service=8787 test/.test_coverage.dart

The relevant section of the test output is as follows:

00:01 +64 -1: upload upload success [E]
  Expected: 'multipart/form-data'
    Actual: 'application/json'
     Which: is different.
            Expected: multipart/ ...
              Actual: applicatio ...
                      ^
             Differ at offset 0

  package:test_api/src/frontend/expect.dart 153:30              fail
  package:test_api/src/frontend/expect.dart 147:3               _expect
  package:test_api/src/frontend/expect.dart 59:3                expect
  test/multipart_upload_test.dart 161:7                         main.<fn>.<fn>

Desktop (please complete the following information):

  • OS: Ubuntu 18.04
  • Version 2.1.1-beta.5

Additional context

@knaeckeKami
Copy link
Contributor

knaeckeKami commented Jan 7, 2020

Likely related:
dart-lang/http#351
Might be a bug in http 0.12.0+3 and fixed in 0.12.0+4?

Edit: can confirm, the test succeeds with http 0.12.0+4.

knaeckeKami pushed a commit to knaeckeKami/graphql-flutter that referenced this issue Jan 7, 2020
knaeckeKami pushed a commit to knaeckeKami/graphql-flutter that referenced this issue Jan 7, 2020
@mainawycliffe
Copy link
Collaborator

Amazing work @knaeckeKami.

knaeckeKami pushed a commit to knaeckeKami/graphql-flutter that referenced this issue Jan 7, 2020
@kulture-rob-snider
Copy link
Contributor

I had a feeling it had to do with the HTTP module, but their changelog just had documentation changes the past couple of releases. Thanks for finding that!!

knaeckeKami pushed a commit to knaeckeKami/graphql-flutter that referenced this issue Jan 7, 2020
@mainawycliffe
Copy link
Collaborator

This issue has been fixed by #530, should be released to beta over the next 24 hours.

Open Scrum automation moved this from To do to Done Jan 8, 2020
HofmannZ pushed a commit that referenced this issue Jan 9, 2020
# [3.0.0-beta.3](v3.0.0-beta.2...v3.0.0-beta.3) (2020-01-09)

### Bug Fixes

* **client:** use http 0.12.0+4 to fix a wrong content-type header on multipart request on http 0.12.0+3 ([ea8822c](ea8822c)), closes [#525](#525)
@HofmannZ
Copy link
Member

HofmannZ commented Jan 9, 2020

🎉 This issue has been resolved in version 3.0.0-beta.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

HofmannZ pushed a commit that referenced this issue Jan 13, 2020
# [3.0.0](v2.1.0...v3.0.0) (2020-01-13)

### Bug Fixes

* **cache:** add value == and hashCode to lazy cache map, fix traversal ([617dde7](617dde7))
* **cache:** AppLifecycleState.{suspending -> detached} ([8bc7b14](8bc7b14))
* **ci:** attempt to fix ci ([4fac2e4](4fac2e4))
* **client:** default toEncodable ([5f938e4](5f938e4))
* **client:** export operation and fetch results ([5dcbae5](5dcbae5))
* **client:** make fetchMore valid with default original document again ([faa3779](faa3779))
* **client:** organize exports alphabetically ([a322339](a322339))
* **client:** patch fetchMore to write to cache ([9cb7474](9cb7474))
* **client:** use http 0.12.0+4 to fix a wrong content-type header on multipart request on http 0.12.0+3 ([ea8822c](ea8822c)), closes [#525](#525)
* **client:** use noCache for fetchMore, avoiding normalization ([da20541](da20541))
* **docs:** remove moved onComplete ([31a0d2f](31a0d2f))
* switch test to AST from document string ([894dc53](894dc53))
* **docs:** use ast for examples ([d68616e](d68616e))
* add eager result to stream, rebuild query widget on var change ([af89b19](af89b19))
* bump gql dependency ([b55a891](b55a891))
* don't set default policies on options so defaults are applied ([fd95e37](fd95e37))
* exception test cases ([001cb48](001cb48))
* fix issues so example runs on latest stable ([87d8feb](87d8feb))
* ignore `*.iml` and `.idea` ([361fdff](361fdff))
* ignore linting errors from the core ([0612d44](0612d44))
* ignore uri doesn't exist lint error ([e14349d](e14349d))
* individually suppress "deprecated_member_use_from_same_package" only ([3879f18](3879f18))
* individually suppress "deprecated_member_use_from_same_package" only ([9216976](9216976))
* pass queryId directly instead of ObservableQuery object ([405ae24](405ae24))
* remove analysis_options.yaml as its ineffective ([0a8d05d](0a8d05d))
* remove equatable package ([0c32b14](0c32b14))
* remove equitable package and update tests ([dbe4db5](dbe4db5))
* subscriptions reconnect ([fd8f3d1](fd8f3d1))
* subscriptions reconnect ([c310db2](c310db2))
* suppress fix: individually suppress "deprecated_member_use_from_same_package" only ([511630f](511630f))
* temporary disable assertion which is failing ([3cf7333](3cf7333))
* update .gitignore with standard flutter paths ([892fe36](892fe36))
* **graphql-flutter:** replace document string with AST Document ([23e40af](23e40af))
* update starwars example ([8aaa99b](8aaa99b))
* **example:** depend on updated angel server, add paging example ([609c4ec](609c4ec))
* **flutter:** prevent observable discarding in `MutationState.didChangeDependencies` ([baeca25](baeca25))
* **flutter:** return callback results in case of futures to await ([c7d6fd1](c7d6fd1))
* **graphql-flutter:** ignore ast errors in the core ([3b16f3f](3b16f3f))
* **packaging:** update rxdart and sdk min versions ([1980f22](1980f22)), closes [#497](#497)
* **tests:** clobbered tests from library-level exceptions ([f76e165](f76e165))
* **tests:** fix failing tests seemingly to to ast-switch ([664fdd1](664fdd1))
* use AST for graphql client example ([edf7df6](edf7df6))
* use case else instead of detached or suspended ([9fb5aab](9fb5aab))

### Features

* **client:** add error link ([de9714a](de9714a)), closes [#419](#419) [#440](#440)
* **client:** cache.reset() added ([8c4f2e2](8c4f2e2))
* **client:** introduce Policies class for options and add defaults to client ([fa24aab](fa24aab))
* **client:** library-level exception handling ([20e57bd](20e57bd))
* **client:** library-level exceptions ([8976cfc](8976cfc))
* **client:** support defining operations from document AST ([fa2db11](fa2db11))
* **client:** support joining multiple links at once ([9565244](9565244))
* attempt to call mutation callbacks from mutation method ([e323a4d](e323a4d))
* better message on UnhandledFailure ([eccab11](eccab11))
* document exception handling ([b38e2a3](b38e2a3))
* **flutter:** add mutation callback for onError ([1ff0b8f](1ff0b8f))
* **graphql-client:** re-export parseString as gql ([dcd5508](dcd5508))
* update examples to gql instead of parse string ([7b9ac57](7b9ac57))
* updating example ([1a1bc43](1a1bc43))
* use equatable package to make it easier to compare links ([a7ed072](a7ed072))

### BREAKING CHANGES

* **packaging:** projects dependent on old sdk/rxdart versions wouldn't build,
there is a way to override rxdart dependency with dependency_override
(we don't use Observable features in these places, so it should be compatible with older version)
there is no way to override min sdk version outside of a project
* **client:** replaces result.errors with result.exception
@HofmannZ
Copy link
Member

🎉 This issue has been resolved in version 3.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Open Scrum
  
Done
Development

No branches or pull requests

5 participants