nodeSolidServer / nodeSolidServer/node-solid-server

CRUD concurrency tests

Đang mở
#1,582 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
JavaScript
Star
1.8k
Fork
308
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Kiểm tra branch của pull request cho các bài kiểm thử CRUD, chạy NSS ở chế độ đa người dùng trên localhost với các biến môi trường được liệt kê và thực thi test/surface/concurrency.test.ts. Bắt đầu với các trường hợp đồng thời đang thất bại và so sánh các response cùng các sự kiện websocket-pubsub quan sát được với các kết quả mong đợi. Hoàn thành nghĩa là toàn bộ test suite chạy qua, bao gồm chính xác một lần tạo thành công và một thông báo cho mỗi trường hợp PUT lặp lại.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript, typescript
Lĩnh vực
backend, testing-qa
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.