[SERVER-62969] Fix ocsp_unable_to_staple_log.js wait to connect issue Created: 25/Jan/22  Updated: 29/Oct/23  Resolved: 06/Jul/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.1, 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Shreyas Kalyan Assignee: Erwin Pe
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Problem/Incident
causes SERVER-62935 Add timestamp with Failed to Load mes... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0, v5.3
Sprint: Security 2022-07-11
Participants:
Linked BF Score: 0

 Description   

ocsp_unable_to_staple_log.js cannot use the waitToConnect feature that exists for most javascript tests. We should try to use the waitForServer function that exists in ocsp_helpers.js to wait for the server rather than put in an arbitrary sleep, and then change the "cat" call to use checklog.js.



 Comments   
Comment by Githook User [ 26/Jul/22 ]

Author:

{'name': 'Erwin Pe', 'email': 'erwin.pe@mongodb.com', 'username': 'erwee'}

Message: SERVER-62969 Fix ocsp_unable_to_staple_log.js wait to connect issue

(cherry picked from commit 1cc3e0d5e745789be973dff6bc7a3e3dc2b282b0)
Branch: v6.0
https://github.com/mongodb/mongo/commit/e155cdf65c1137cd39fc6d7b805a970c5d9d8345

Comment by Githook User [ 06/Jul/22 ]

Author:

{'name': 'Erwin Pe', 'email': 'erwin.pe@mongodb.com', 'username': 'erwee'}

Message: SERVER-62969 Fix ocsp_unable_to_staple_log.js wait to connect issue
Branch: master
https://github.com/mongodb/mongo/commit/1cc3e0d5e745789be973dff6bc7a3e3dc2b282b0

Comment by Sergey Galtsev (Inactive) [ 08/Feb/22 ]

Alternatively since we are waiting for a line in log file, we can just ignore missing log file until it appears. Something like:

assert.soon(() => {
  try {
    return cat(logPath).trim().split("\n").some((line) => JSON.parse(line).id === failedToStapleID);
  } catch { return false }
});

 

Generated at Thu Feb 08 05:56:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.