X Tutup
The Wayback Machine - https://web.archive.org/web/20220517174241/https://github.com/nodejs/node/pull/42683
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 test labels Apr 10, 2022
@richardlau richardlau added the request-ci label Apr 13, 2022
@github-actions github-actions bot removed the request-ci label Apr 13, 2022
@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Apr 13, 2022

Safety measure because ICU bumps are semver-patch
@richardlau richardlau added the request-ci label Apr 13, 2022
@github-actions github-actions bot removed the request-ci label Apr 13, 2022
@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Apr 13, 2022

aduh95
aduh95 approved these changes Apr 29, 2022
@aduh95 aduh95 added author ready request-ci labels Apr 29, 2022
@github-actions github-actions bot removed the request-ci label Apr 29, 2022
@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Apr 29, 2022

@aduh95
Copy link
Contributor

@aduh95 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 label Apr 29, 2022
@aduh95 aduh95 added the request-ci label Apr 30, 2022
@github-actions github-actions bot removed the request-ci label Apr 30, 2022
@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Apr 30, 2022

@LiviaMedeiros
Copy link
Contributor Author

@LiviaMedeiros 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 request-ci labels May 3, 2022
@github-actions github-actions bot removed the request-ci label May 3, 2022
@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented May 3, 2022

aduh95
aduh95 approved these changes May 5, 2022
@aduh95 aduh95 added commit-queue commit-queue-squash labels May 5, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue label May 5, 2022
@nodejs-github-bot nodejs-github-bot merged commit edcc542 into nodejs:master May 5, 2022
55 checks passed
@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented May 5, 2022

Landed in edcc542

RafaelGSS pushed a commit that referenced this issue 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready commit-queue-squash needs-ci test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants
X Tutup