Skip to content

test(hub): Remove duplicate session test #3650

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

Merged
merged 4 commits into from
Jun 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/hub/src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export class SessionFlusher implements SessionFlusherLike {
logger.warn("Dropping session because custom transport doesn't implement sendSession");
return;
}
this._transport.sendSession(sessionAggregates).then(null, reason => {
void this._transport.sendSession(sessionAggregates).then(null, reason => {
logger.error(`Error while sending session: ${reason}`);
});
}
Expand Down
7 changes: 5 additions & 2 deletions packages/hub/test/session.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ describe('Session', () => {
['sets a did', { user: { id: 'specialID123' } }, { did: 'specialID123' }],
['sets a timestamp', { timestamp: time }, { timestamp: new Date(time * 1000).toISOString() }],
['sets a sid', { sid: '99705f22a3f1468e95ba7386e84691aa' }, { sid: '99705f22a3f1468e95ba7386e84691aa' }],
['requires custom sid to be of certain length', { sid: '123' }, { sid: expect.not.stringMatching('123') }],
['requires custom sid to be of certain length', { sid: '123' }, { sid: expect.not.stringMatching('123') }],
[
'requires custom sid to be of certain length',
{ sid: 'fake-sid' },
{ sid: expect.not.stringMatching('fake-sid') },
],
['sets an init', { init: false }, { init: false }],
['sets an did', { did: 'specialID123' }, { did: 'specialID123' }],
['overwrites user did with custom did', { did: 'custom-did', user: { id: 'user-id' } }, { did: 'custom-did' }],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ module.exports = async ({ page, url, requests }) => {
errors: 0,
});

await sleep(100);

expectSession(requests.sessions[2], {
init: true,
status: 'ok',
Expand Down
152 changes: 76 additions & 76 deletions packages/nextjs/test/integration/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@
resolved "https://registry.yarnpkg.com/@opentelemetry/context-base/-/context-base-0.14.0.tgz#c67fc20a4d891447ca1a855d7d70fa79a3533001"
integrity sha512-sDOAZcYwynHFTbLo6n8kIbLiVF3a3BLkrmehJUyEbT9F+Smbi47kLGS2gG2g0fjBLR/Lr1InPD7kXL7FaTqEkw==

"@sentry/[email protected].0":
version "6.5.0"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-6.5.0.tgz#2382493691c3fac5d8b652ae46f09f1b29d288ef"
integrity sha512-n1e8hNKwuVP4bLqRK5J0DHFqnnnrbv6h6+Bc1eNRbf32/e6eZ3Cb36PTplqDCxwnMnnIEEowd5F4ZWeTLPPY3A==
dependencies:
"@sentry/core" "6.5.0"
"@sentry/types" "6.5.0"
"@sentry/utils" "6.5.0"
"@sentry/[email protected].1":
version "6.5.1"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-6.5.1.tgz#9a6ed5607b3b0f4e83f38720e3e202906f8c5bdb"
integrity sha512-iVLCdEFwsoWAzE/hNknexPQjjDpMQV7mmaq9Z1P63bD6MfhwVTx4hG4pHn8HEvC38VvCVf1wv0v/LxtoODAYXg==
dependencies:
"@sentry/core" "6.5.1"
"@sentry/types" "6.5.1"
"@sentry/utils" "6.5.1"
tslib "^1.9.3"

"@sentry/cli@^1.63.1":
Expand All @@ -125,106 +125,106 @@
progress "^2.0.3"
proxy-from-env "^1.1.0"

"@sentry/[email protected].0":
version "6.5.0"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-6.5.0.tgz#03ecbad7845b31f03a84eddf4884877c999bb6be"
integrity sha512-Hx/WvhM5bXcXqfIiz+505TjYYfPjQ8mrxby/EWl+L7dYUCyI/W6IZKTc/MoHlLuM+JPUW9c1bw/97TzbgTzaAA==
"@sentry/[email protected].1":
version "6.5.1"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-6.5.1.tgz#c8b6c3ed86ed07b193c95d599c1b9a4a161e500e"
integrity sha512-Mh3sl/iUOT1myHmM6RlDy2ARzkUClx/g4DAt1rJ/IpQBOlDYQraplXSIW80i/hzRgQDfwhwgf4wUa5DicKBjKw==
dependencies:
"@sentry/hub" "6.5.0"
"@sentry/minimal" "6.5.0"
"@sentry/types" "6.5.0"
"@sentry/utils" "6.5.0"
"@sentry/hub" "6.5.1"
"@sentry/minimal" "6.5.1"
"@sentry/types" "6.5.1"
"@sentry/utils" "6.5.1"
tslib "^1.9.3"

"@sentry/[email protected].0":
version "6.5.0"
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-6.5.0.tgz#ad3c9bcf83050ea217f3c25cc625e6b447f1d9d7"
integrity sha512-vEChnLoozOJzEJoTUvaAsK/n7IHoQFx8P1TzQmnR+8XGZJZmGHG6bBXUH0iS2a9hhR1WkoEBeiL+t96R9uyf0A==
"@sentry/[email protected].1":
version "6.5.1"
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-6.5.1.tgz#135ef09d07d32e87a53f664c0ae8fcc4f5963519"
integrity sha512-lBRMBVMYP8B4PfRiM70murbtJAXiIAao/asDEMIRNGMP6pI2ArqXfJCBYDkStukhikYD0Kqb4trXq+JYF07Hbg==
dependencies:
"@sentry/types" "6.5.0"
"@sentry/utils" "6.5.0"
"@sentry/types" "6.5.1"
"@sentry/utils" "6.5.1"
tslib "^1.9.3"

"@sentry/[email protected].0":
version "6.5.0"
resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-6.5.0.tgz#b97702f5d5e5456b9fae225b60141bd014671662"
integrity sha512-pI8DESNTbsj60CDtLzIdLHex59NGzjTBR9Wpt7SG8NPhgEAuS3tUU4Thjyib7sGb7mxRw1sSQt/FsjDd7vMjLg==
"@sentry/[email protected].1":
version "6.5.1"
resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-6.5.1.tgz#e7016f3023a98e2ef893daba18ba74bd8d62654b"
integrity sha512-NYiW0rH7fwv7aRtrRnfCSIiwulfV2NoLjhmghCONsyo10DNtYmOpogLotCytZFWLDnTJW1+pmTomq8UW/OSTcQ==
dependencies:
"@sentry/types" "6.5.0"
"@sentry/utils" "6.5.0"
"@sentry/types" "6.5.1"
"@sentry/utils" "6.5.1"
localforage "^1.8.1"
tslib "^1.9.3"

"@sentry/[email protected].0":
version "6.5.0"
resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-6.5.0.tgz#aa89b8e24c88aa85c99ef64e0b460497c90133f9"
integrity sha512-MT83ONaBhTCFUlDIQFpsG/lq3ZjGK7jwQ10qxGadSg1KW6EvtQRg+OBwULeQ7C+nNEAhseNrC/qomZMT8brncg==
"@sentry/[email protected].1":
version "6.5.1"
resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-6.5.1.tgz#b8c1b382c2ea788eec3d32d203e5081b00eb6838"
integrity sha512-q9Do/oreu1RP695CXCLowVDuQyk7ilE6FGdz2QLpTXAfx8247qOwk6+zy9Kea/Djk93+BoSDVQUSneNiVwl0nQ==
dependencies:
"@sentry/hub" "6.5.0"
"@sentry/types" "6.5.0"
"@sentry/hub" "6.5.1"
"@sentry/types" "6.5.1"
tslib "^1.9.3"

"@sentry/nextjs@file:../..":
version "6.5.0"
dependencies:
"@sentry/core" "6.5.0"
"@sentry/integrations" "6.5.0"
"@sentry/node" "6.5.0"
"@sentry/react" "6.5.0"
"@sentry/tracing" "6.5.0"
"@sentry/utils" "6.5.0"
version "6.5.1"
dependencies:
"@sentry/core" "6.5.1"
"@sentry/integrations" "6.5.1"
"@sentry/node" "6.5.1"
"@sentry/react" "6.5.1"
"@sentry/tracing" "6.5.1"
"@sentry/utils" "6.5.1"
"@sentry/webpack-plugin" "1.15.0"
tslib "^1.9.3"

"@sentry/[email protected].0":
version "6.5.0"
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-6.5.0.tgz#4c043792bae0b84de7c485fad605fd871be050a5"
integrity sha512-KSypDtc8XPoyMdL1BCdkNokNmEaf+AZhD4HTElmIKHpIyiYvM1bSqiOpVohnwR3E+5qNeVVBPoVjDpHWRaNzQg==
"@sentry/[email protected].1":
version "6.5.1"
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-6.5.1.tgz#a572b380858de5aeaf98eade6d8d3afcba13d364"
integrity sha512-Yh8J/QJ5e8gRBVL9VLCDpUvmiaxsxVZm0CInPHw3V/smgMkrzSKEiqxSeMq8ImPlaJrCFECqdpv4gnvYKI+mQQ==
dependencies:
"@sentry/core" "6.5.0"
"@sentry/hub" "6.5.0"
"@sentry/tracing" "6.5.0"
"@sentry/types" "6.5.0"
"@sentry/utils" "6.5.0"
"@sentry/core" "6.5.1"
"@sentry/hub" "6.5.1"
"@sentry/tracing" "6.5.1"
"@sentry/types" "6.5.1"
"@sentry/utils" "6.5.1"
cookie "^0.4.1"
https-proxy-agent "^5.0.0"
lru_map "^0.3.3"
tslib "^1.9.3"

"@sentry/[email protected].0":
version "6.5.0"
resolved "https://registry.yarnpkg.com/@sentry/react/-/react-6.5.0.tgz#db2067e080cac24da046af24865b82d3567adbf4"
integrity sha512-NyH+v8MwX+nzuhPRGy3+DHSB0es5yaCUNrtAdCtbe8EhERSoYvqAyWIQ+Fp5++PGjfAtYbz0W0IpsjguZbnT2Q==
"@sentry/[email protected].1":
version "6.5.1"
resolved "https://registry.yarnpkg.com/@sentry/react/-/react-6.5.1.tgz#1c7019fc3d8b1168c1ab8936cb65971b314d060d"
integrity sha512-YeGi7FzInhMZQxiy5fKqb7kS6W+u4NfsjzsVV3bLjJ1kiVtbpzZ2gs+ObHqW3zVE622V4nL7A4P8/CBHbcm5PA==
dependencies:
"@sentry/browser" "6.5.0"
"@sentry/minimal" "6.5.0"
"@sentry/types" "6.5.0"
"@sentry/utils" "6.5.0"
"@sentry/browser" "6.5.1"
"@sentry/minimal" "6.5.1"
"@sentry/types" "6.5.1"
"@sentry/utils" "6.5.1"
hoist-non-react-statics "^3.3.2"
tslib "^1.9.3"

"@sentry/[email protected].0":
version "6.5.0"
resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-6.5.0.tgz#4d8efce53362a820d002838495f0ef446150aefc"
integrity sha512-6jpmYM3Lt4w6dOeK8keGAis722ooLtX5UcPbekkTufXiqKRR5VWg8DLUp7z7oD6h4GLrLbeNtCiH6h20ZW2ggw==
"@sentry/[email protected].1":
version "6.5.1"
resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-6.5.1.tgz#a5f3e497d4f1f319f36475df050e135cf65af750"
integrity sha512-y1W/xFC2hAuKqSuuaovkElHY4pbli3XoXrreesg8PtO7ilX6ZbatOQbHsEsHQyoUv0F6aVA+MABOxWH2jt7tfw==
dependencies:
"@sentry/hub" "6.5.0"
"@sentry/minimal" "6.5.0"
"@sentry/types" "6.5.0"
"@sentry/utils" "6.5.0"
"@sentry/hub" "6.5.1"
"@sentry/minimal" "6.5.1"
"@sentry/types" "6.5.1"
"@sentry/utils" "6.5.1"
tslib "^1.9.3"

"@sentry/[email protected].0":
version "6.5.0"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.5.0.tgz#2cdb50875bb73d87708b9c0a80d4ca057b3596b5"
integrity sha512-yQpTCIYxBsYT0GenqHNNKeXV8CSkkYlAxB1IGV2eac4IKC5ph5GW6TfDGwvlzQSQ297RsRmOSA8o3I5gGPd2yA==
"@sentry/[email protected].1":
version "6.5.1"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.5.1.tgz#0a34ecfd1ae9275a416a105640eb4bed45a46a1d"
integrity sha512-b/7a6CMoytaeFPx4IBjfxPw3nPvsQh7ui1C8Vw0LxNNDgBwVhPLzUOWeLWbo5YZCVbGEMIWwtCUQYWxneceZSA==

"@sentry/[email protected].0":
version "6.5.0"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-6.5.0.tgz#8722542b9a901623195cffaab5d18ce176c1e459"
integrity sha512-CcHuaQN6vRuAsIC+3sA23NmWLRmUN0x/HNQxk0DHJylvYQdEA0AUNoLXogykaXh6NrCx4DNq9yCQTNTSC3mFxg==
"@sentry/[email protected].1":
version "6.5.1"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-6.5.1.tgz#046baf7d1a6564d6d555437ad3674dba9bc0806a"
integrity sha512-Wv86JYGQH+ZJ5XGFQX7h6ijl32667ikenoL9EyXMn8UoOYX/MLwZoQZin1P60wmKkYR9ifTNVmpaI9OoTaH+UQ==
dependencies:
"@sentry/types" "6.5.0"
"@sentry/types" "6.5.1"
tslib "^1.9.3"

"@sentry/[email protected]":
Expand Down