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

Bug: Broken Tests for Fetch #116

Open
2 tasks done
sbshah97 opened this issue Dec 1, 2023 · 5 comments
Open
2 tasks done

Bug: Broken Tests for Fetch #116

sbshah97 opened this issue Dec 1, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@sbshah97
Copy link
Contributor

sbshah97 commented Dec 1, 2023

Describe the bug

This bug is a follow up from the below PR. This requires us to fix testcases listed in TestFetch()
This is not a bug in the SDK and a bug in the core engine which needs to be fixed.

#115

Steps to reproduce

  1. Comment out s.T().Skip
  2. Run testcase and ensure it passes successfully

Expected behaviour

The tests listed above are expected to pass.

SurrealDB version

surreal 1.0.0 for MacOS

Contact Details

sbs.191197@gmail.com

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct
@sbshah97 sbshah97 added the bug Something isn't working label Dec 1, 2023
@phughk
Copy link
Contributor

phughk commented Dec 1, 2023

Thinking briefly here, this may be to do with deserialising the results from fetch. We might want to try to reproduce a JSON reponse to the deserialiser for a test.

@phughk
Copy link
Contributor

phughk commented Dec 1, 2023

Also, this might be related in case it is deserialisation: https://stackoverflow.com/questions/77553464/deserializing-a-graph-query/77582309#77582309

@sbshah97
Copy link
Contributor Author

sbshah97 commented Dec 1, 2023

We might want to try to reproduce a JSON reponse to the deserialiser for a test.
This would be a test in the core engine surrealdb code itself?

@phughk
Copy link
Contributor

phughk commented Dec 4, 2023

This would be a test in the driver. We would have a fake network layer, and fake json responses.

fakeNetwork := FakeNetwork() // This doesnt exist, we would need to create a mock or something
driver := fakeNetwork.newDriver() // Hypothetically. We basically need a factory that allows a network layer to be injected for testing

fakeNetwork.when(any()).then(someJson)

let result = driver.query(bla)

assertResult(result)

Something like that

@varshard
Copy link

I guess this is a known issue, but would like to make it more obvious.
I believe that surrealdb/surrealdb#3028 block this issue as any parsing after fetch will result in an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants