Skip to content

Commit

Permalink
fix(unit tests): unit test restore
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyvercolano committed Sep 8, 2021
1 parent 11688b9 commit fc36938
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions common/transport/amqp/test/_amqp_cbs_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ describe('ClaimsBasedSecurityAgent', function() {
cbs.attach(function(err) {
assert.isNotOk(err, 'initialization passed');
cbs.putToken('myAudience', 'my token');
uuidStub.restore();
uuid.v4.restore();
assert.equal(fakeRheaSenderLink.send.args[0][0].application_properties.operation, 'put-token', 'operation application property not equal');
assert.equal(fakeRheaSenderLink.send.args[0][0].application_properties.type, 'servicebus.windows.net:sastoken', 'type application property not equal');
assert.equal(fakeRheaSenderLink.send.args[0][0].application_properties.name, 'myAudience', 'name application property not equal');
Expand Down Expand Up @@ -705,7 +705,7 @@ describe('ClaimsBasedSecurityAgent', function() {
clearTimeout(cbs._putToken.timeoutTimer);
testCallback();
});
uuidStub.restore();
uuid.v4.restore();
});
});

Expand Down Expand Up @@ -782,7 +782,7 @@ describe('ClaimsBasedSecurityAgent', function() {
process.nextTick(function () {
this.clock.tick(40000); // 40 seconds more should have resulted in timeouts for the third.
}.bind(this));
uuidStub.restore();
uuid.v4.restore();
}.bind(this));
});

Expand Down Expand Up @@ -888,7 +888,7 @@ describe('ClaimsBasedSecurityAgent', function() {
}.bind(this));
}.bind(this));
}.bind(this));
uuidStub.restore();
uuid.v4.restore();
}.bind(this));
});

Expand Down
4 changes: 2 additions & 2 deletions provisioning/transport/mqtt/test/_mqtt_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ describe('Mqtt', function () {
uuidStub.returns(fakeUuids[0]);

mqtt.queryOperationStatus(fakeRequest, fakeOperationId, function(err, result) {
uuidStub.restore();
uuid.v4.restore();
assert.oneOf(err, [null, undefined]);
assert.deepEqual(result, fakeResponse);
callback();
Expand Down Expand Up @@ -356,7 +356,7 @@ describe('Mqtt', function () {
uuidStub.returns(fakeUuids[0]);
mqtt.setTransportOptions({pollingInterval: configPollingInterval});
op.invoke(function(err, result, response, pollingInterval) {
uuidStub.restore();
uuid.v4.restore();
assert.oneOf(err, [null, undefined]);
assert.equal((theQueryString.indexOf('retry-after') === -1) ? (configPollingInterval) : (dpsPollingInterval*1000), pollingInterval);
callback();
Expand Down

0 comments on commit fc36938

Please sign in to comment.