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

Failed Patch and Concurrency tests for ESS #60

Open
mrvahedi68 opened this issue Jun 15, 2022 · 10 comments
Open

Failed Patch and Concurrency tests for ESS #60

mrvahedi68 opened this issue Jun 15, 2022 · 10 comments

Comments

@mrvahedi68
Copy link
Collaborator

When I run tests over ess I got this result:

Test Suites: 3 failed, 4 passed, 7 total
Tests:       10 failed, 33 skipped, 26 passed, 69 total
Snapshots:   0 total
Time:        141.155 s

This failed is for concurrency and PATCH requests.
Patch requests that have an n3 content type are not executed correctly. In the following you can find one of the run results:

● Update › Using PATCH to replace triple (present) › updates the resource

   expect(received).toEqual(expected) // deep equality

   Expected: ArrayContaining [{"graph": {"classOrder": 5, "termType": "NamedNode", "value": "https://pod.inrupt.com/solidtestsuite/solidtestsuite/solid-crud-tests-1655288222491/exists/exists4.ttl"}, "object": {"classOrder": 5, "termType": "NamedNode", "value": "https://pod.inrupt.com/solidtestsuite/solidtestsuite/solid-crud-tests-1655288222491/exists/exists4.ttl#fact"}, "predicate": {"classOrder": 5, "termType": "NamedNode", "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"}, "subject": {"classOrder": 5, "termType": "NamedNode", "value": "https://pod.inrupt.com/solidtestsuite/solidtestsuite/solid-crud-tests-1655288222491/exists/exists4.ttl#that"}}]
   Received: [{"graph": {"classOrder": 5, "termType": "NamedNode", "value": "https://pod.inrupt.com/solidtestsuite/solidtestsuite/solid-crud-tests-1655288222491/exists/exists4.ttl"}, "object": {"classOrder": 5, "termType": "NamedNode", "value": "http://www.w3.org/ns/ldp#RDFSource"}, "predicate": {"classOrder": 5, "termType": "NamedNode", "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"}, "subject": {"classOrder": 5, "termType": "NamedNode", "value": "https://pod.inrupt.com/solidtestsuite/solidtestsuite/solid-crud-tests-1655288222491/exists/exists4.ttl"}}, {"graph": {"classOrder": 5, "termType": "NamedNode", "value": "https://pod.inrupt.com/solidtestsuite/solidtestsuite/solid-crud-tests-1655288222491/exists/exists4.ttl"}, "object": {"classOrder": 5, "termType": "NamedNode", "value": "https://pod.inrupt.com/solidtestsuite/solidtestsuite/solid-crud-tests-1655288222491/exists/exists4.ttl#world"}, "predicate": {"classOrder": 5, "termType": "NamedNode", "value": "https://pod.inrupt.com/solidtestsuite/solidtestsuite/solid-crud-tests-1655288222491/exists/exists4.ttl#linked"}, "subject": {"classOrder": 5, "termType": "NamedNode", "value": "https://pod.inrupt.com/solidtestsuite/solidtestsuite/solid-crud-tests-1655288222491/exists/exists4.ttl#hello"}}]

@michielbdejong
Copy link
Collaborator

@acoburn does Inrupt Pod Spaces support text/n3 PATCH requests?

@michielbdejong
Copy link
Collaborator

Trying to reproduce this with this patch.n3:

@prefix solid: <http://www.w3.org/ns/solid/terms#>.
<#patch> a solid:InsertDeletePatch;
  solid:deletes { <#hello> <#linked> <#world> .};
  solid:inserts { <#that> a <#fact> .}.

And this curl command:

curl -v -X 'PATCH' -T patch.n3 -H 'Content-Type: text/n3' -H 'authorization: DPoP eyJhbGciOiJSUzI1NiIsImtpZCI6IkpxS29zX2J0SHBnIn0.eyJpc3MiOiJodHRwczovL3NvbGlkY29tbXVuaXR5Lm5ldCIsImF1ZCI6InNvbGlkIiwic3ViIjoiaHR0cHM6Ly9zb2xpZHRlc3RzdWl0ZS5zb2xpZGNvbW11bml0eS5uZXQvcHJvZmlsZS9jYXJkI21lIiwiZXhwIjoxNjU2NTA1NjM0LCJpYXQiOjE2NTUyOTYwMzQsImp0aSI6IjgzZmNiYWEzMmNkODk5MWQiLCJjbmYiOnsiamt0IjoiaXc4MkY2M0RyVWNnNWpOajBlaWhubWZXT0hQTktIdThxbmVDbTRJWUxMNCJ9LCJjbGllbnRfaWQiOiJlYTVmZGQ1ODU1ZmQzZmMxNjJjZTg1MDlkNDM1NGR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ZDQm9HOFpxeFZQWU9LbFZ3QXQ0OHlPSTR4dyJ9fQ.eyJodHUiOiJodHRwczovL3BvZC5pbnJ1cHQuY29tL3NvbGlkdGVzdHN1aXRlL3NvbGlkdGVzdHN1aXRlL3NvbGlkLWNydWQtdGVzdHMtMTY1NTI5NjAzMzg3Mi9leGlzdHMvZXhpc3RzNC50dGwiLCJodG0iOiJQQVRDSCIsImp0aSI6IjU4ZTAwMzFhLWJiZjYtNDRjNC04NjVhLTVmNDMxZjA5MTc3ZiIsImlhdCI6MTY1NTI5NjAzNiwiZXhwIjoxNjU1Mjk5NjM2fQ.W1F85y3S-P2YTIoEwtXNdeRATH3OFR81ycZRgpxjp7PVsw5PU3jlbVB7CxqGPZ4PnNt_jw7OK0jlmceThL00q1i5FptxszBAe5OyUrt-Byx6L71MeLJuYnhHxjuTu6Ghei8bJsf93y2O_t0ocaRhIMAlXdiJahPfU5jjqNG2R5G8hxZBlG8NRSiaj-u9kggJZVa1tR6ZbdxhEpPNwcpoZ_8Z-Guaq1OU_fv84KmybQL_2C2GI1Kq3bQjFTWM3M2FmJrdeLfK-wTCF36JbTtiUIxgTmxSO2xKmQlsQ6EbeEVPIRf9HioSsudsQoayd_0oC5dKOZTxmrWQLvwAt6lT1A' https://pod.inrupt.com/solidtestsuite/solidtestsuite/solid-crud-tests-1655296033872/exists/exists4.ttl

@michielbdejong
Copy link
Collaborator

Response:

{
    "error": {
        
        "code": "415",
        "message": "Unsupported Media Type"
    }
}

So that looks like text/n3 is not supported.

@michielbdejong
Copy link
Collaborator

This should be fixed in https://inrupt.com/blog/pod-spaces-upgrade - will test!

@michielbdejong
Copy link
Collaborator

Now running SKIP_CONC=1 ./run-against-ess.sh

@michielbdejong
Copy link
Collaborator

Ah...

PUT /solidtestsuite/solidtestsuite/solid-crud-tests-1664202003855/exists/exists4.ttl now returns
Location: https://storage.inrupt.com/7bb20678-42c7-44fc-b71b-b0989332cde4/solidtestsuite/solid-crud-tests-1664202003855/exists/exists4.ttl

That's stopping our test runner from running this test.

@michielbdejong
Copy link
Collaborator

Hm, now getting a 415 Unsupported Media Type with:

{"description":"Content-Type [text/n3] is not supported for PATCH requests"}

This is on https://storage.inrupt.com/7bb20678-42c7-44fc-b71b-b0989332cde4/solidtestsuite/solid-crud-tests-1664204120169/exists/exists4.ttl which is supposedly running the latest version of Inrupt ESS, right?

@ThisIsMissEm
Copy link

@michielbdejong I can't add much here, but as of July 2022, Inrupt's PodSpaces (https://login.inrupt.com/ / https://storage.inrupt.com/) is using Enterprise Solid Server 2.0, just for what it's worth.

@michielbdejong
Copy link
Collaborator

Thank you @ThisIsMissEm! Yes, that was also my understanding.

@michielbdejong
Copy link
Collaborator

I just tested it again and

curl 'https://storage.inrupt.com/7bb20678-42c7-44fc-b71b-b0989332cde4/getting-started/test.ttl' \
  -X 'PATCH' \
  -H 'authority: storage.inrupt.com' \
  -H 'accept: */*' \
  -H 'accept-language: nl-NL,nl;q=0.9,en-US;q=0.8,en;q=0.7,fr-FR;q=0.6,fr;q=0.5,de-DE;q=0.4,de;q=0.3,es-ES;q=0.2,es;q=0.1,id-ID;q=0.1,id;q=0.1' \
  -H 'authorization: DPoP eyJraWQiOiJISmhrMmJNdEpIMEIiLCJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJ3ZWJpZCI6Imh0dHBzOi8vaWQuaW5ydXB0LmNvbS9zb2xpZHRlc3RzdWl0ZSIsImNuZiI6eyJqa3QiOiJaM1VZZS1BbUpKTm9OVTlvOW1seE9yNzBwRUVuU3U0S2xIbHFhS0loVjUwIn0sInN1YiI6InNvbGlkdGVzdHN1aXRlIiwiYXVkIjoic29saWQiLCJjbGllbnRfaWQiOiI0N2E0NjcyMy1kMTI3LTRhYWYtOWVmOS00ZTQzMjI1OTllNmQiLCJpc3MiOiJodHRwczovL2xvZ2luLmlucnVwdC5jb20iLCJpYXQiOjE2OTQ1MzUyNzEsImV4cCI6MTY5NDUzNTU3MSwianRpIjoiZmY5ZWJkODktZjI0ZC00YzBjLTlkMGItYTdmOTIzZWEzYjczIn0.N3MARrcNWAF6WYnG-nyyDV_tUHDnh_5jGk6izlId83rAbfXztlx1gi9tjtrKsga7iNNxKrQlc1fmGwvl7aVqhA' \
  -H 'content-type: text/n3' \
  -H 'dpop: eyJhbGciOiJFUzI1NiIsImp3ayI6eyJjcnYiOiJQLTI1NiIsImt0eSI6IkVDIiwieCI6InhpdWhhbzE1ZlUtYjhvTlRLWXhMX3VlNFZ5Rm1OOWJ6eHNhWGkydDIyZTAiLCJ5IjoiT2VnSVQ4RGwtZG9zS3VnQ01FQUN4dUJ6aC1pTzh1Q1kwNFVjTnlndFo3RSIsImFsZyI6IkVTMjU2In0sInR5cCI6ImRwb3Arand0In0.eyJodHUiOiJodHRwczovL3N0b3JhZ2UuaW5ydXB0LmNvbS83YmIyMDY3OC00MmM3LTQ0ZmMtYjcxYi1iMDk4OTMzMmNkZTQvZ2V0dGluZy1zdGFydGVkL3Rlc3QudHRsIiwiaHRtIjoiUEFUQ0giLCJqdGkiOiI1MjIzMGUwYS1mNTdmLTRjODItOThhYy1jNWEwMzQwNzM2NjQiLCJpYXQiOjE2OTQ1MzUyNzd9.1o7z2KV4FCotLjKlCV82FReyCDbjpkI6xllmMLJKbjFtUwVAnn-88Dgvel48n8vDrgW-tRoDqvCTjXgd_iwZbA' \
  -H 'origin: http://localhost:8080' \
  -H 'referer: http://localhost:8080/' \
  -H 'sec-ch-ua: "Chromium";v="116", "Not)A;Brand";v="24", "Google Chrome";v="116"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: cross-site' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36' \
  --data-raw $'@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n<#patch> a solid:InsertDeletePatch;\n  solid:inserts { <#hello> <#linked> <#world> .}.\n' \
  --compressed

is still returning a 415, although the response body has improved, FWIW -it has changed to:

{"description":"Content-Type [text/n3] is not supported for PATCH requests"}

@acoburn can you comment please?

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

No branches or pull requests

3 participants