Skip to content

test: adapt to cds 9#344

Closed
hm23 wants to merge 2 commits into
mainfrom
hm23-patch-1
Closed

test: adapt to cds 9#344
hm23 wants to merge 2 commits into
mainfrom
hm23-patch-1

Conversation

@hm23

@hm23 hm23 commented May 28, 2025

Copy link
Copy Markdown
Contributor

No description provided.

// 2: no outbox -> consumer gets new root context
// REVISIT: for some reason, the emit done in the on succeeded callback gets a new root context when running in jest
expect(log.output.match(/\[telemetry\] - elapsed times:/g).length).to.equal(3) //> actually 2
expect(log.output.match(/\[telemetry\] - elapsed times:/g).length).to.equal(4)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

log.output in cds 8:
image

log.outputin cds 9:
image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we should deactivate the queue for the existing tests and then add extra ones for it

@hm23 hm23 Jun 4, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if I understand your comment, sorry. Tests for outbox: false are already in place in test/tracing-messaging-without-outbox.test.js, or?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, but that worked because the persistent outbox was off by default, i.e., the disabling was omitted. now, we need to explicitly set the in memory outbox: https://github.com/cap-js/telemetry/pull/338/files#diff-08b958738e72f5b16d4eb669fe005de06cf9dfc430ecda1494064d1dec87c93bR5

Comment thread test/logging.test.js
'log.type': 'LogRecord',
'exception.message': "Cannot read properties of undefined (reading 'exist')",
'exception.stacktrace': s => s.match(/^TypeError: .+(\n\s+at .+){6}$/),
'exception.stacktrace': s => s.match(/^TypeError: .+(\n\s+at .+){5}$/),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stacktrace got shorter...

@hm23
hm23 requested a review from sjvans May 28, 2025 10:00
@sjvans

sjvans commented Jun 4, 2025

Copy link
Copy Markdown
Contributor

superseded by #338

@sjvans sjvans closed this Jun 4, 2025
@sjvans
sjvans deleted the hm23-patch-1 branch August 13, 2025 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants