nodeSolidServer / nodeSolidServer/node-solid-server
CRUD concurrency tests
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- JavaScript
- Estrelas
- 1.8k
- Forks
- 308
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
See https://github.com/solid/solid-crud-tests/pull/47, check out that branch of the CRUD tests.
Run NSS in multi-user mode on localhost. Then:
export OIDC_ISSUER_ALICE=https://localhost:8443
export STORAGE_ROOT=https://alice.localhost:8443
export ALICE_WEBID=${STORAGE_ROOT}/profile/card#me
export USERNAME_ALICE=alice
export PASSWORD_ALICE=123
export CURL_RESULT_ALICE=`curl -ki $OIDC_ISSUER_ALICE/login/password -d"username=$USERNAME_ALICE&password=$PASSWORD_ALICE" | grep Set-Cookie`
export COOKIE_ALICE=`expr "$CURL_RESULT_ALICE" : '^Set-Cookie:\ \(.*\).'`
export NODE_TLS_REJECT_UNAUTHORIZED=0
./node_modules/.bin/jest test/surface/concurrency.test.ts
FAIL test/surface/concurrency.test.ts
● Concurrency › Try to create the same resource, using PUT 10 times › succeeds exactly once
expect(received).toEqual(expected) // deep equality
Expected: 1
Received: 10
88 | results.filter((result) => responseCodeGroup(result.status) === "2xx")
89 | .length
> 90 | ).toEqual(1);
| ^
91 | });
92 | it("creates the resource", async () => {
93 | const result = await authFetcher.fetch(resourceUrl);
at Object.<anonymous> (test/surface/concurrency.test.ts:90:9)
● Concurrency › Try to create the same resource, using PUT 10 times › emits websockets-pubsub on the container exactly once
expect(received).toEqual(expected) // deep equality
Expected: 1
Received: 10
115 | (x) => x === `pub ${containerUrl}`
116 | ).length
> 117 | ).toEqual(1);
| ^
118 | });
119 | ifWps("emits websockets-pubsub on the resource exactly once", () => {
120 | expect(
at Object.<anonymous> (test/surface/concurrency.test.ts:117:9)
● Concurrency › Try to create the same resource, using PUT 10 times › emits websockets-pubsub on the resource exactly once
expect(received).toEqual(expected) // deep equality
Expected: 1
Received: 10
122 | (x) => x === `pub ${resourceUrl}`
123 | ).length
> 124 | ).toEqual(1);
| ^
125 | });
126 | });
127 | describe("Use PATCH 10 times to add triple to the same resource", () => {
at Object.<anonymous> (test/surface/concurrency.test.ts:124:9)
Test Suites: 1 failed, 1 total
Tests: 3 failed, 6 passed, 9 total
Snapshots: 0 total
Time: 11.794 s
Ran all test suites matching /test\/surface\/concurrency.test.ts/i.
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Confira a branch do pull request dos testes CRUD, execute o NSS no modo multiusuário em localhost com as variáveis de ambiente listadas e execute test/surface/concurrency.test.ts. Comece pelos casos de concorrência que estão falhando e compare as respostas e os eventos de websocket-pubsub observados com as expectativas. Considera-se concluído quando a suíte passar, incluindo exatamente uma criação bem-sucedida e uma notificação para cada caso de PUT repetido.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- javascript, typescript
- Domínio
- backend, testing-qa
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100