Closed Bug 1848763 Opened 1 year ago Closed 1 year ago

test_connection_reset in test_ntlm_proxy_auth.js throws

Categories

(Core :: Networking: HTTP, defect, P3)

defect

Tracking

()

RESOLVED FIXED
119 Branch
Tracking Status
firefox119 --- fixed

People

(Reporter: smayya, Assigned: smayya)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

We have a typo in the connection_reset test_ntlm_proxy_auth.js. The following statement throws.

--- a/netwerk/test/unit/test_ntlm_proxy_auth.js
+++ b/netwerk/test/unit/test_ntlm_proxy_auth.js
@@ -222,9 +222,13 @@ function connectionReset(metadata, respo
       authPrefix = authorization.substring(0, NTLM_PREFIX_LEN);
       Assert.equal(NTLM_TYPE3_PREFIX, authPrefix, "Expecting a Type 3 message");
       ntlmTypeTwoCount++;
-      response.seizePower();
-      response.bodyOutPutStream.close();
-      response.finish();
+      try {
+        response.seizePower();
+        response.bodyOutPutStream.close();
+        response.finish();
+      } catch (e) {
+        Assert.ok(false, "unexpected exception" + e);
+      }
       break;
netwerk/test/unit/test_ntlm_proxy_auth.js
  FAIL test_connection_reset - [test_connection_reset : 230] unexpected exceptionTypeError: can't access property "close", response.bodyOutPutStream is undefined - false == true
/Users/sunilmayya/software/workspace/obj-aarch64-apple-darwin21.6.0/_tests/xpcshell/netwerk/test/unit/test_ntlm_proxy_auth.js:connectionReset:230
resource://testing-common/httpd.sys.mjs:handleResponse:2491
resource://testing-common/httpd.sys.mjs:process:1344
resource://testing-common/httpd.sys.mjs:_handleResponse:1788
resource://testing-common/httpd.sys.mjs:_processBody:1636
resource://testing-common/httpd.sys.mjs:onInputStreamReady:1515
/Users/sunilmayya/software/workspace/testing/xpcshell/head.js:_do_main:245
/Users/sunilmayya/software/workspace/testing/xpcshell/head.js:_execute_test:592

We need to replace bodyOutPutStream with bodyOutputStream in this test_ntlm_proxy_auth.js.

Depends on D182698

Pushed by smayya@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/92d80b858050 update ntlm connection reset tests. r=necko-reviewers,valentin
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch

Backed out for conflicts when backing out Bug 1820807 and Bug 1853025.

Backout link: https://hg.mozilla.org/mozilla-central/rev/f4b0e304eceb

Status: RESOLVED → REOPENED
Flags: needinfo?(smayya)
Resolution: FIXED → ---
Target Milestone: 119 Branch → ---
Pushed by smayya@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1c63d427bae4 update ntlm connection reset tests. r=necko-reviewers,valentin
Status: REOPENED → RESOLVED
Closed: 1 year ago1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
Flags: needinfo?(smayya)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: