Skip to content

Commit f1915ea

Browse files
[CERT-210] - Fixed regex for Ubuntu compatibility
1 parent d9f5949 commit f1915ea

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scripts/run-scenarios.cjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,11 @@ function getMirroredPath(original) {
356356
*/
357357
function parseRequests(output) {
358358
const lines = output.split(/\r?\n/);
359-
const requestHeaderRegex = /^v4\\.*\\(.+?) \((\d{3}) [A-Za-z ]+\) - (\d+) ms$/;
360-
const requestHeaderRegexAlt = /^v4\\.*\\(.+?) \((\d{3})\) - (\d+) ms$/; // fallback variant
359+
// Match lines like:
360+
// v4/MasterSchedule/BellSchedules/01 - CREATE a BellSchedule (201 Created) - 907 ms
361+
// or with backslashes on some platforms. Capture groups: (1) filename, (2) statusCode, (3) timeMs
362+
const requestHeaderRegex = /^v4[\/\\].*?\/([^\/]+) \((\d{3})(?: [^)]+)?\) - (\d+) ms$/;
363+
const requestHeaderRegexAlt = /^v4[\/\\].*?\/([^\/]+) \((\d{3})\) - (\d+) ms$/; // fallback variant
361364
const requests = [];
362365
let current = null;
363366
let inAssertions = false;

0 commit comments

Comments
 (0)