Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

CRUD concurrency tests

Aperta
#1,582 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript, typescript

Direzione di ricerca

Controlla il branch della pull request dei test CRUD, esegui NSS in modalità multiutente su localhost con le variabili d'ambiente elencate ed esegui test/surface/concurrency.test.ts. Inizia dai casi di concorrenza non riusciti e confronta le risposte e gli eventi websocket-pubsub osservati con le aspettative. Il lavoro è completato quando la suite passa, includendo esattamente una creazione riuscita e una notifica per ogni caso di PUT ripetuto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
JavaScript
Stelle
1.8k
Fork
308
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nodeSolidServer/node-solid-server

Tutte le issue di nodeSolidServer/node-solid-server

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.