Skip to content

Commit

Permalink
fixup! Fix NTLM auth state when iterations are more than 3
Browse files Browse the repository at this point in the history
  • Loading branch information
coditva committed Dec 23, 2019
1 parent 58fe97b commit 4fa701c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
8 changes: 1 addition & 7 deletions lib/runner/extensions/item.command.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ module.exports = {

var request = result.request,
response = result.response,
cookies = result.cookies,
auth = result.item.getAuth();
cookies = result.cookies;

if ((stopOnError || stopOnFailure) && requestError) {
this.triggers.item(null, coords, item); // @todo - should this trigger receive error?
Expand All @@ -212,11 +211,6 @@ module.exports = {
// set cookies for this transaction
cookies && (ctxTemplate.cookies = cookies);

// update the item auth to prevent loss of auth state
// @note this is a hack because the auth architecture is messy, and there is some confusion
// between `originalItem` and `item`.
auth && (item.auth = auth);

// the context template also has a test object to store assertions
ctxTemplate.tests = {}; // @todo remove

Expand Down
4 changes: 1 addition & 3 deletions lib/runner/replay-controller.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var _ = require('lodash'),
createItemContext = require('./create-item-context'),

// total number of replays allowed
MAX_REPLAY_COUNT = 3,
Expand Down Expand Up @@ -51,8 +50,7 @@ _.assign(ReplayController.prototype, /** @lends ReplayController.prototype */{
abortOnError: true
}, desiredPayload);

// create item context from the new item
payload.context = createItemContext(payload, context);
payload.context = context;

this.run.immediate('httprequest', payload)
.done(function (response) {
Expand Down

0 comments on commit 4fa701c

Please sign in to comment.