`Test timings for variant ${timingsVariant}: ${timingSources.variant} from variant, ${timingSources.max} from max across variants, ${timingSources.legacy} from legacy, ${timingSources.none} without timing`
)
constcurGroupIdx=groupPos-1
tests=groups[curGroupIdx]
...
...
@@ -1087,6 +1327,7 @@ ${ENDGROUP}`)
}
if(options.timings){
/** @type {Record<string, number>} */
constcurTimings={}
// let junitData = `<testsuites name="jest tests">`
/*
...
...
@@ -1116,26 +1357,13 @@ ${ENDGROUP}`)
if(shouldUseSharedTimings){
if(kvClient){
try{
// Fetch existing timings and merge with new ones
constexistingTimings=(awaitgetTestTimings())||{}
constnewTimings={
...existingTimings,
...curTimings,
}
// Clean up stale timings for deleted tests
for(consttestofObject.keys(newTimings)){
if(!fs.existsSync(path.join(__dirname,test))){
console.log('removing stale timing',test)
deletenewTimings[test]
}
}
// Update KV store with retries
awaitretryKVOperation(async()=>{
awaitkvClient.set(KV_TIMINGS_KEY,newTimings)
console.log('Successfully updated test timings in KV store')