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

Run v3 integration tests against v4 codegen + runtime #5418

Closed
wants to merge 14 commits into from

Conversation

martinbonnin
Copy link
Contributor

Opening as a draft only to check the places that need updating

Comment on lines -393 to +399
assertResponseListEquals(networkResponses, networkActual)
assertIs<ApolloCompositeException>(throwable)
throwable as ApolloCompositeException
assertIs<ApolloNetworkException>(throwable!!.suppressedExceptions.first())
assertIs<CacheMissException>(throwable!!.suppressedExceptions.getOrNull(1))
assertEquals("Object 'computers.0.screen' has no field named 'isColor'", throwable!!.suppressedExceptions.getOrNull(1)!!.message)
assertResponseListEquals(networkResponses, responses.take(2))

assertIs<ApolloNetworkException>(responses.get(2).exception)
responses.get(3).exception.apply {
assertIs<CacheMissException>(this)
assertEquals("Object 'computers.0.screen' has no field named 'isColor'", message)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That one is interesting. The previous behaviour is not emulated by our toFlowV3 replacement in the @defer case. Here 3.x had a ApolloCompositeException even though there were technically success network responses.

@@ -2,13 +2,13 @@
android-plugin = "7.2.1"
android-plugin-min = "3.4.2"
android-sdkversion-compile = "31"
android-sdkversion-min = "15"
android-sdkversion-min = "16"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For SQLDelight 2

assertTrue(records.containsKey("""animalById({"id":null})"""))
assertTrue(records.containsKey("""animalById({"id":0})"""))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually the correct behaviour 🎉

query GetAnimalByIdWithDefaultValue($id: ID = 0) {
  animalById(id: $id) {
    species
  }
}

@martinbonnin
Copy link
Contributor Author

Closing this one as it's not meant to be merged. It's there as a reference only.

@martinbonnin martinbonnin deleted the test-4 branch January 24, 2024 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant