nodeSolidServer / nodeSolidServer/node-solid-server
CRUD concurrency tests
オープン
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 1.8k
- フォーク
- 308
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
CRUD テストの pull request ブランチを確認し、記載されている環境変数を使って localhost 上で NSS をマルチユーザーモードで実行し、test/surface/concurrency.test.ts を実行します。まず失敗している並行性ケースから始め、観測されたレスポンスと websocket-pubsub イベントを期待値と比較します。各繰り返し PUT ケースで、作成の成功がちょうど 1 回、通知がちょうど 1 回発生することを含め、スイートがパスすれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, typescript
- 領域
- backend, testing-qa
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100