@@ -330,7 +330,7 @@ describe("sendTelemetry with HTTP stub", () => {
330330 it ( "sends startup event with required common fields" , async ( ) => {
331331 sendTelemetry ( "startup" ) ;
332332 // Wait for setImmediate + fetch
333- await new Promise ( ( r ) => setTimeout ( r , 200 ) ) ;
333+ await new Promise ( ( r ) => setTimeout ( r , 2000 ) ) ;
334334 assert . equal ( receivedRequests . length , 1 ) ;
335335 const event = receivedRequests [ 0 ] . events [ 0 ] ;
336336 assert . equal ( event . event , "startup" ) ;
@@ -356,7 +356,7 @@ describe("sendTelemetry with HTTP stub", () => {
356356 chunks : 1 ,
357357 error_class : null ,
358358 } ) ;
359- await new Promise ( ( r ) => setTimeout ( r , 200 ) ) ;
359+ await new Promise ( ( r ) => setTimeout ( r , 2000 ) ) ;
360360 assert . equal ( receivedRequests . length , 1 ) ;
361361 const event = receivedRequests [ 0 ] . events [ 0 ] ;
362362 assert . equal ( event . event , "audit_complete" ) ;
@@ -368,22 +368,22 @@ describe("sendTelemetry with HTTP stub", () => {
368368 it ( "does NOT send when AXME_TELEMETRY_DISABLED is set" , async ( ) => {
369369 process . env . AXME_TELEMETRY_DISABLED = "1" ;
370370 sendTelemetry ( "startup" ) ;
371- await new Promise ( ( r ) => setTimeout ( r , 200 ) ) ;
371+ await new Promise ( ( r ) => setTimeout ( r , 2000 ) ) ;
372372 assert . equal ( receivedRequests . length , 0 ) ;
373373 } ) ;
374374
375375 it ( "does NOT send when DO_NOT_TRACK is set" , async ( ) => {
376376 process . env . DO_NOT_TRACK = "1" ;
377377 sendTelemetry ( "startup" ) ;
378- await new Promise ( ( r ) => setTimeout ( r , 200 ) ) ;
378+ await new Promise ( ( r ) => setTimeout ( r , 2000 ) ) ;
379379 assert . equal ( receivedRequests . length , 0 ) ;
380380 } ) ;
381381
382382 it ( "does NOT generate mid file when disabled" , async ( ) => {
383383 process . env . AXME_TELEMETRY_DISABLED = "1" ;
384384 sendTelemetry ( "startup" ) ;
385385 sendStartupEvents ( ) ;
386- await new Promise ( ( r ) => setTimeout ( r , 100 ) ) ;
386+ await new Promise ( ( r ) => setTimeout ( r , 2000 ) ) ;
387387 assert . equal ( existsSync ( _getMidFilePath ( ) ) , false ) ;
388388 } ) ;
389389
@@ -393,7 +393,7 @@ describe("sendTelemetry with HTTP stub", () => {
393393 process . env . AXME_TELEMETRY_ENDPOINT = "http://127.0.0.1:1/dead-endpoint" ;
394394
395395 sendTelemetry ( "startup" ) ;
396- await new Promise ( ( r ) => setTimeout ( r , 500 ) ) ;
396+ await new Promise ( ( r ) => setTimeout ( r , 2000 ) ) ;
397397
398398 const queuePath = _getQueueFilePath ( ) ;
399399 assert . equal ( existsSync ( queuePath ) , true ) ;
@@ -409,7 +409,7 @@ describe("sendTelemetry with HTTP stub", () => {
409409 await new Promise < void > ( ( resolve ) => server . close ( ( ) => resolve ( ) ) ) ;
410410 process . env . AXME_TELEMETRY_ENDPOINT = "http://127.0.0.1:1/dead" ;
411411 sendTelemetry ( "startup" , { test : "first" } ) ;
412- await new Promise ( ( r ) => setTimeout ( r , 500 ) ) ;
412+ await new Promise ( ( r ) => setTimeout ( r , 2000 ) ) ;
413413
414414 // Verify queue has 1 event
415415 assert . equal ( existsSync ( _getQueueFilePath ( ) ) , true ) ;
@@ -431,7 +431,7 @@ describe("sendTelemetry with HTTP stub", () => {
431431 // Send again — should ship queued + new in one batch
432432 receivedRequests . length = 0 ;
433433 sendTelemetry ( "startup" , { test : "second" } ) ;
434- await new Promise ( ( r ) => setTimeout ( r , 300 ) ) ;
434+ await new Promise ( ( r ) => setTimeout ( r , 2000 ) ) ;
435435
436436 assert . equal ( receivedRequests . length , 1 ) ;
437437 assert . equal ( receivedRequests [ 0 ] . events . length , 2 ) ;
@@ -461,7 +461,7 @@ describe("sendStartupEvents", () => {
461461 sendStartupEvents ( ) ;
462462 sendStartupEvents ( ) ;
463463 sendStartupEvents ( ) ;
464- await new Promise ( ( r ) => setTimeout ( r , 300 ) ) ;
464+ await new Promise ( ( r ) => setTimeout ( r , 2000 ) ) ;
465465
466466 // First call sends install + startup (2 batches with batch limit), second/third calls do nothing
467467 // We can't strictly count because batching is async, but it must be more than 0 and not 9
@@ -491,7 +491,7 @@ describe("reportError", () => {
491491 process . env . AXME_TELEMETRY_ENDPOINT = `http://127.0.0.1:${ port } /v1/telemetry/events` ;
492492
493493 reportError ( "audit" , "prompt_too_long" , true ) ;
494- await new Promise ( ( r ) => setTimeout ( r , 300 ) ) ;
494+ await new Promise ( ( r ) => setTimeout ( r , 2000 ) ) ;
495495
496496 assert . ok ( received ) ;
497497 const event = received . events [ 0 ] ;
@@ -519,7 +519,7 @@ describe("reportError", () => {
519519 process . env . AXME_TELEMETRY_ENDPOINT = `http://127.0.0.1:${ port } /v1/telemetry/events` ;
520520
521521 reportError ( "hook" , "network_error" , false ) ;
522- await new Promise ( ( r ) => setTimeout ( r , 300 ) ) ;
522+ await new Promise ( ( r ) => setTimeout ( r , 2000 ) ) ;
523523
524524 assert . ok ( received ) ;
525525 const event = received . events [ 0 ] ;
@@ -686,7 +686,7 @@ describe("ci field detection in events", () => {
686686 process . env . AXME_TELEMETRY_ENDPOINT = `http://127.0.0.1:${ port } /v1/telemetry/events` ;
687687
688688 sendTelemetry ( "startup" ) ;
689- await new Promise ( ( r ) => setTimeout ( r , 200 ) ) ;
689+ await new Promise ( ( r ) => setTimeout ( r , 2000 ) ) ;
690690
691691 assert . ok ( received , "request received" ) ;
692692 assert . equal ( received . events [ 0 ] . ci , true , "ci=true in payload" ) ;
@@ -710,7 +710,7 @@ describe("ci field detection in events", () => {
710710 process . env . AXME_TELEMETRY_ENDPOINT = `http://127.0.0.1:${ port } /v1/telemetry/events` ;
711711
712712 sendTelemetry ( "startup" ) ;
713- await new Promise ( ( r ) => setTimeout ( r , 200 ) ) ;
713+ await new Promise ( ( r ) => setTimeout ( r , 2000 ) ) ;
714714
715715 assert . ok ( received , "request received" ) ;
716716 assert . equal ( received . events [ 0 ] . ci , false , "ci=false default" ) ;
@@ -749,7 +749,7 @@ describe("audit_complete payload shape", () => {
749749 dropped_count : 0 ,
750750 error_class : null ,
751751 } ) ;
752- await new Promise ( ( r ) => setTimeout ( r , 200 ) ) ;
752+ await new Promise ( ( r ) => setTimeout ( r , 2000 ) ) ;
753753
754754 assert . ok ( received ) ;
755755 const event = received . events [ 0 ] ;
@@ -796,7 +796,7 @@ describe("setup_complete payload shape", () => {
796796 is_workspace : false ,
797797 child_repos : 0 ,
798798 } ) ;
799- await new Promise ( ( r ) => setTimeout ( r , 200 ) ) ;
799+ await new Promise ( ( r ) => setTimeout ( r , 2000 ) ) ;
800800
801801 assert . ok ( received ) ;
802802 const event = received . events [ 0 ] ;
0 commit comments