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

test: improve observable ICU behaviour coverage #42683

Merged
merged 5 commits into from
May 5, 2022

Conversation

LiviaMedeiros
Copy link
Contributor

@LiviaMedeiros LiviaMedeiros commented Apr 10, 2022

Refs: #42440

Test for bundled full-icu and its intergation with Node.
Starting from v70, it caches locale and ignores attempts to mutate process.env in runtime (for example, to normalize Date stringification). This test gives an example of observable results and tests if this behaviour is kept.

Tests are performed for full-icu >=71.x.

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Apr 10, 2022
@richardlau richardlau added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 13, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 13, 2022
@nodejs-github-bot
Copy link
Collaborator

Safety measure because ICU bumps are semver-patch
@richardlau richardlau added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 13, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 13, 2022
@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Apr 29, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 29, 2022
@nodejs-github-bot
Copy link
Collaborator

@aduh95
Copy link
Contributor

aduh95 commented Apr 29, 2022

Related CI failures

node:assert:123
  throw new AssertionError(obj);
  ^

AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected

  [
    'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
+   'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
+   'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
+   'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
+   'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
+   'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
+   'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
+   'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
+   'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
+   'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
+   'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
+   'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
+   'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
+   'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
+   'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
+   'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)'
-   'Fri Jul 25 1980 01:35:33 GMT+0100 (中欧标准时间)',
-   'Fri Jul 25 1980 01:35:33 GMT+0100 (मध्य यूरोपीय मानक समय)',
-   'Fri Jul 25 1980 01:35:33 GMT+0100 (hora estándar de Europa central)',
-   'Fri Jul 25 1980 01:35:33 GMT+0100 (heure normale d’Europe centrale)',
-   'Fri Jul 25 1980 01:35:33 GMT+0100 (توقيت وسط أوروبا الرسمي)',
-   'Fri Jul 25 1980 01:35:33 GMT+0100 (মধ্য ইউরোপীয় মানক সময়)',
-   'Fri Jul 25 1980 01:35:33 GMT+0100 (Центральная Европа, стандартное время)',
-   'Fri Jul 25 1980 01:35:33 GMT+0100 (Horário Padrão da Europa Central)',
-   'Fri Jul 25 1980 01:35:33 GMT+0100 (وسطی یورپ کا معیاری وقت)',
-   'Fri Jul 25 1980 01:35:33 GMT+0100 (Waktu Standar Eropa Tengah)',
-   'Fri Jul 25 1980 01:35:33 GMT+0100 (Mitteleuropäische Normalzeit)',
-   'Fri Jul 25 1980 01:35:33 GMT+0100 (中央ヨーロッパ標準時)',
-   'Fri Jul 25 1980 01:35:33 GMT+0100 (Mídúl Yúrop Fíksd Taim)',
-   'Fri Jul 25 1980 01:35:33 GMT+0100 (मध्‍य युरोपियन प्रमाण वेळ)',
-   'Fri Jul 25 1980 01:35:33 GMT+0100 (సెంట్రల్ యూరోపియన్ ప్రామాణిక సమయం)'
  ]
    at Object.<anonymous> (/home/iojs/build/workspace/node-test-commit-linux/test/parallel/test-icu-env.js:90:10)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Module._load (node:internal/modules/cjs/loader:827:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47 {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: [
    'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)'
  ],
  expected: [
    'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (中欧标准时间)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (मध्य यूरोपीय मानक समय)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (hora estándar de Europa central)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (heure normale d’Europe centrale)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (توقيت وسط أوروبا الرسمي)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (মধ্য ইউরোপীয় মানক সময়)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (Центральная Европа, стандартное время)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (Horário Padrão da Europa Central)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (وسطی یورپ کا معیاری وقت)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (Waktu Standar Eropa Tengah)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (Mitteleuropäische Normalzeit)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (中央ヨーロッパ標準時)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (Mídúl Yúrop Fíksd Taim)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (मध्‍य युरोपियन प्रमाण वेळ)',
    'Fri Jul 25 1980 01:35:33 GMT+0100 (సెంట్రల్ యూరోపియన్ ప్రామాణిక సమయం)'
  ],
  operator: 'deepStrictEqual'
}

Node.js v19.0.0-pre

@aduh95 aduh95 removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 29, 2022
@aduh95 aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 30, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 30, 2022
@nodejs-github-bot
Copy link
Collaborator

@LiviaMedeiros
Copy link
Contributor Author

LiviaMedeiros commented Apr 30, 2022

My apologies, totally forgot to look at CI here at least once.
Mocking LANG env variable failed in

  • node-test-commit-custom-suites-freestyle
  • node-test-binary-armv7l
  • node-test-commit-arm
  • node-test-commit-linux/nodes=alpine-latest-x64
  • node-test-commit-linux/nodes=alpine-last-latest-x64
  • nonzero amount of environments where common.isOSX == true

No idea what those have in common (maybe bug, maybe some settings disallowing that, maybe they want LC_{TIME,...}/LC_ALL instead).
Added preemptive check if it works for mocking part of test.

This failure should be caused by running in Worker thread, added check for that as well.

@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels May 3, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 3, 2022
@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels May 5, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label May 5, 2022
@nodejs-github-bot nodejs-github-bot merged commit edcc542 into nodejs:master May 5, 2022
@nodejs-github-bot
Copy link
Collaborator

Landed in edcc542

RafaelGSS pushed a commit that referenced this pull request May 10, 2022
PR-URL: #42683
Refs: #42440
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
@RafaelGSS RafaelGSS mentioned this pull request May 10, 2022
juanarbol pushed a commit that referenced this pull request May 31, 2022
PR-URL: #42683
Refs: #42440
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
@richardlau richardlau mentioned this pull request Jun 20, 2022
4 tasks
danielleadams pushed a commit that referenced this pull request Jun 27, 2022
PR-URL: #42683
Refs: #42440
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
targos pushed a commit that referenced this pull request Jul 12, 2022
PR-URL: #42683
Refs: #42440
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
targos pushed a commit that referenced this pull request Jul 31, 2022
PR-URL: #42683
Refs: #42440
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
PR-URL: nodejs/node#42683
Refs: nodejs/node#42440
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants