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

wip: feat: add types and start setting up SSE response handler in server #462

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Setup SSE Server to handle responses/feed requests back and forth

7eeb208
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Draft

wip: feat: add types and start setting up SSE response handler in server #462

Setup SSE Server to handle responses/feed requests back and forth
7eeb208
Select commit
Loading
Failed to load commit list.
GitHub Actions / Test Report failed Dec 19, 2024 in 0s

1006 passed, 1 failed and 199 skipped

Tests failed

❌ jest-junit.xml

1206 tests were completed in 470s with 1006 passed, 1 failed and 199 skipped.

Test suite Passed Failed Skipped Time
harness/features/allFeatures.cloud.test.ts 2✅ 1⚪ 185ms
harness/features/allFeatures.cloud.test.ts 2✅ 1⚪ 186ms
harness/features/allFeatures.cloud.test.ts 2✅ 1⚪ 183ms
harness/features/allFeatures.cloud.test.ts 3⚪ 168ms
harness/features/allFeatures.cloud.test.ts 3⚪ 165ms
harness/features/allFeatures.cloud.test.ts 2✅ 1⚪ 778ms
harness/features/allFeatures.cloud.test.ts 2✅ 1⚪ 186ms
harness/features/allFeatures.cloud.test.ts 2✅ 1⚪ 182ms
harness/features/allFeatures.local.test.ts 3✅ 3s
harness/features/allFeatures.local.test.ts 3✅ 3s
harness/features/allFeatures.local.test.ts 3✅ 370ms
harness/features/allFeatures.local.test.ts 3✅ 356ms
harness/features/allFeatures.local.test.ts 3✅ 327ms
harness/features/allFeatures.local.test.ts 3✅ 279ms
harness/features/allFeatures.local.test.ts 3✅ 554ms
harness/features/allFeatures.local.test.ts 3✅ 681ms
harness/features/allVariables.cloud.test.ts 5✅ 273ms
harness/features/allVariables.cloud.test.ts 5✅ 227ms
harness/features/allVariables.cloud.test.ts 5✅ 4s
harness/features/allVariables.cloud.test.ts 5⚪ 170ms
harness/features/allVariables.cloud.test.ts 5⚪ 844ms
harness/features/allVariables.cloud.test.ts 5✅ 4s
harness/features/allVariables.cloud.test.ts 5✅ 7s
harness/features/allVariables.cloud.test.ts 5✅ 7s
harness/features/allVariables.local.test.ts 2✅ 417ms
harness/features/allVariables.local.test.ts 2✅ 421ms
harness/features/allVariables.local.test.ts 2✅ 3s
harness/features/allVariables.local.test.ts 2✅ 2s
harness/features/allVariables.local.test.ts 2✅ 340ms
harness/features/allVariables.local.test.ts 2✅ 3s
harness/features/allVariables.local.test.ts 2✅ 3s
harness/features/allVariables.local.test.ts 2✅ 3s
harness/features/bootstrapping.test.ts 2⚪ 210ms
harness/features/bootstrapping.test.ts 2⚪ 163ms
harness/features/bootstrapping.test.ts 2⚪ 161ms
harness/features/bootstrapping.test.ts 2⚪ 162ms
harness/features/bootstrapping.test.ts 2⚪ 279ms
harness/features/bootstrapping.test.ts 2⚪ 189ms
harness/features/bootstrapping.test.ts 2⚪ 166ms
harness/features/bootstrapping.test.ts 2✅ 272ms
harness/features/clientCustomData.test.ts 2✅ 424ms
harness/features/clientCustomData.test.ts 2✅ 427ms
harness/features/clientCustomData.test.ts 2⚪ 199ms
harness/features/clientCustomData.test.ts 2⚪ 151ms
harness/features/clientCustomData.test.ts 2✅ 1s
harness/features/clientCustomData.test.ts 2✅ 1s
harness/features/clientCustomData.test.ts 2⚪ 270ms
harness/features/clientCustomData.test.ts 2✅ 503ms
harness/features/initialize.cloud.test.ts 3✅ 167ms
harness/features/initialize.cloud.test.ts 3✅ 180ms
harness/features/initialize.cloud.test.ts 3✅ 310ms
harness/features/initialize.cloud.test.ts 3⚪ 281ms
harness/features/initialize.cloud.test.ts 3⚪ 333ms
harness/features/initialize.cloud.test.ts 3✅ 272ms
harness/features/initialize.cloud.test.ts 3✅ 310ms
harness/features/initialize.cloud.test.ts 3✅ 181ms
harness/features/initialize.local.test.ts 12✅ 1⚪ 18s
harness/features/initialize.local.test.ts 11✅ 1❌ 1⚪ 18s
harness/features/initialize.local.test.ts 12✅ 1⚪ 13s
harness/features/initialize.local.test.ts 12✅ 1⚪ 12s
harness/features/initialize.local.test.ts 12✅ 1⚪ 13s
harness/features/initialize.local.test.ts 12✅ 1⚪ 12s
harness/features/initialize.local.test.ts 12✅ 1⚪ 13s
harness/features/initialize.local.test.ts 12✅ 1⚪ 13s
harness/features/multithreading.local.test.ts 5⚪ 196ms
harness/features/multithreading.local.test.ts 5⚪ 192ms
harness/features/multithreading.local.test.ts 5⚪ 181ms
harness/features/multithreading.local.test.ts 5⚪ 270ms
harness/features/multithreading.local.test.ts 5⚪ 335ms
harness/features/multithreading.local.test.ts 5✅ 3s
harness/features/multithreading.local.test.ts 5⚪ 851ms
harness/features/multithreading.local.test.ts 5⚪ 970ms
harness/features/track.cloud.test.ts 4✅ 225ms
harness/features/track.cloud.test.ts 4✅ 238ms
harness/features/track.cloud.test.ts 4✅ 332ms
harness/features/track.cloud.test.ts 4⚪ 175ms
harness/features/track.cloud.test.ts 4⚪ 171ms
harness/features/track.cloud.test.ts 4✅ 423ms
harness/features/track.cloud.test.ts 4✅ 426ms
harness/features/track.cloud.test.ts 4✅ 314ms
harness/features/track.local.test.ts 4✅ 8s
harness/features/track.local.test.ts 4✅ 8s
harness/features/track.local.test.ts 4✅ 6s
harness/features/track.local.test.ts 4✅ 7s
harness/features/track.local.test.ts 4✅ 8s
harness/features/track.local.test.ts 4✅ 6s
harness/features/track.local.test.ts 4✅ 8s
harness/features/track.local.test.ts 4✅ 7s
harness/features/variable.cloud.test.ts 34✅ 2⚪ 1s
harness/features/variable.cloud.test.ts 34✅ 2⚪ 6s
harness/features/variable.cloud.test.ts 32✅ 2⚪ 28s
harness/features/variable.cloud.test.ts 36⚪ 1s
harness/features/variable.cloud.test.ts 36⚪ 403ms
harness/features/variable.cloud.test.ts 34✅ 2⚪ 56s
harness/features/variable.cloud.test.ts 34✅ 2⚪ 28s
harness/features/variable.cloud.test.ts 34✅ 2⚪ 56s
harness/features/variable.local.test.ts 66✅ 41s
harness/features/variable.local.test.ts 66✅ 42s
harness/features/variable.local.test.ts 58✅ 8⚪ 47s
harness/features/variable.local.test.ts 58✅ 8⚪ 32s
harness/features/variable.local.test.ts 66✅ 47s
harness/features/variable.local.test.ts 66✅ 52s
harness/features/variable.local.test.ts 66✅ 41s
harness/features/variable.local.test.ts 66✅ 47s
harness/types/capabilities.test.ts 3✅ 92ms
harness/types/capabilities.test.ts 3✅ 79ms
harness/types/capabilities.test.ts 3✅ 81ms
harness/types/capabilities.test.ts 3✅ 93ms
harness/types/capabilities.test.ts 3✅ 80ms
harness/types/capabilities.test.ts 3✅ 101ms
harness/types/capabilities.test.ts 3✅ 102ms
harness/types/capabilities.test.ts 3✅ 91ms

❌ harness/features/initialize.local.test.ts

Initialize Tests - Local
  ✅ should error when SDK key is missing
  ✅ should error when SDK key is invalid
  ✅ initializes correctly on valid data
  ✅ calls initialize promise/callback when config is successfully retrieved
  ✅ calls initialize promise/callback when config fails to be retrieved
  ❌ defaults variable when config fails to be retrieved, and then recovers
	Error: Unexpected requests received: Error: Nock: No match for request {
  ⚪ stops the polling interval when the sdk key is invalid and cdn responds 403, throws error
  ✅ fetches config again after 3 seconds when config polling interval is overriden
  ✅ uses the same config if the etag matches
  ✅ uses the same config if the refetch fails, after retrying once
  ✅ uses the same config if the response is invalid JSON
  ✅ uses the same config if the response is valid JSON but invalid data
  ✅ uses the new config when etag changes, and flushes existing events

Annotations

Check failure on line 26 in harness/mockServer/index.ts

See this annotation in the file changed.

@github-actions github-actions / Test Report

harness/features/initialize.local.test.ts ► Initialize Tests - Local ► defaults variable when config fails to be retrieved, and then recovers

Failed test found in:
  jest-junit.xml
Error:
  Error: Unexpected requests received: Error: Nock: No match for request {
Raw output
Error: Unexpected requests received: Error: Nock: No match for request {
  "method": "GET",
  "url": "https://myfakenockurl/client/cdd5ab73-6623-4371-82b5-ee565df4cb18/config/v2/server/dvc_server_cdd5ab73-6623-4371-82b5-ee565df4cb18.json",
  "headers": {
    "accept": "application/json, text/plain, */*",
    "content-type": "application/json",
    "host": "172.17.0.1:33225",
    "connection": "Keep-Alive",
    "accept-encoding": "gzip",
    "user-agent": "okhttp/4.10.0"
  }
}
    at assertNoUnmatchedRequests (/home/runner/work/test-harness/test-harness/harness/mockServer/index.ts:26:19)
    at cleanupCurrentClient (/home/runner/work/test-harness/test-harness/harness/helpers/helpers.ts:94:22)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async Object.<anonymous> (/home/runner/work/test-harness/test-harness/harness/helpers/helpers.ts:74:9)