[ServiceBus][test] log more diagnostic information (#20986)
* log more information to help diagnose test failure in issue #20963. * Update sdk/servicebus/service-bus/test/internal/unit/receiverCommon.spec.ts Co-authored-by: Deyaaeldeen Almahallawi <dealmaha@microsoft.com>
This commit is contained in:
Родитель
69aa3f9726
Коммит
f58ac8ae6f
|
@ -323,9 +323,13 @@ describe("shared receiver code", () => {
|
|||
if (numRetryCalls > 1) {
|
||||
// not the first attempt
|
||||
const currentTime = Date.now();
|
||||
if (currentTime - previousAttemptTime < retryDelayInMs) {
|
||||
const elapsed = currentTime - previousAttemptTime;
|
||||
console.log(
|
||||
`### ${elapsed} ms passed (from ${previousAttemptTime} to ${currentTime})`
|
||||
);
|
||||
if (elapsed < retryDelayInMs) {
|
||||
errorMessages.push(
|
||||
`Unexpected, Should've waited at least ${retryDelayInMs} between attempts`
|
||||
`Elapsed time ${elapsed} ms (from ${previousAttemptTime} to ${currentTime}) is shorter than expected, the wait between attempts should have been at least ${retryDelayInMs} ms.`
|
||||
);
|
||||
}
|
||||
previousAttemptTime = currentTime;
|
||||
|
|
Загрузка…
Ссылка в новой задаче