Skip to content

Commit 54b6f03

Browse files
committed
removed unnecessary comments
1 parent edf2e19 commit 54b6f03

2 files changed

Lines changed: 0 additions & 22 deletions

File tree

bin/testObservability/cypress/index.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -201,16 +201,6 @@ Cypress.on('command:end', (command) => {
201201
});
202202
});
203203

204-
/*
205-
* cy.log capture must happen at command-enqueue time, not at command-execute
206-
* time. When a test body throws synchronously (e.g. a failing chai assertion),
207-
* Cypress drops every pending command in the test queue — so an execute-time
208-
* wrapper on cy.log never fires for queued logs preceding the throw.
209-
* command:enqueued fires synchronously at the user's cy.log() call site,
210-
* before the throw, so the buffer is populated regardless of pass/fail.
211-
* The buffered entries are then flushed via cy.task in the SDK's afterEach,
212-
* which Mocha runs even on test failure.
213-
*/
214204
Cypress.on('command:enqueued', (attrs) => {
215205
if (!Cypress.env('BROWSERSTACK_O11Y_LOGS')) return;
216206
if (!attrs || attrs.name !== 'log') return;

bin/testObservability/reporter/index.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -628,18 +628,6 @@ class MyReporter {
628628

629629
appendTestItemLog = async (log) => {
630630
try {
631-
/*
632-
* SDK-5709: keep the hash gate on hook side (avoids attributing logs to
633-
* a stale hook pointer between hooks). Drop it on the test side. In
634-
* Cypress, EVENT_TEST_FAIL fires synchronously when a test body throws —
635-
* before afterEach runs. The SDK's internal afterEach flushes its
636-
* cy.log buffer via cy.task during afterEach, so by the time those logs
637-
* reach this listener runStatusMarkedHash[testAnalyticsId] is already
638-
* set and the log was being dropped without ever attaching a
639-
* test_run_uuid. Late LogCreated events with test_run_uuid are accepted
640-
* by the analytics backend (uploadTestSteps takes the same path with
641-
* no gate).
642-
*/
643631
if(this.current_hook && ( this.current_hook.hookAnalyticsId && !this.runStatusMarkedHash[this.current_hook.hookAnalyticsId] )) {
644632
log.hook_run_uuid = this.current_hook.hookAnalyticsId;
645633
}

0 commit comments

Comments
 (0)