testit-js-commons 4.0.0 → 4.0.1-TMS-5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -24,7 +24,7 @@ class BaseConverter {
|
|
|
24
24
|
}
|
|
25
25
|
toOriginLink(link) {
|
|
26
26
|
// @ts-ignore
|
|
27
|
-
return Object.assign(Object.assign({}, link), { type: link.type ? this.toOriginLinkType(link.type) :
|
|
27
|
+
return Object.assign(Object.assign({}, link), { type: link.type ? this.toOriginLinkType(link.type) : "Related", hasInfo: true });
|
|
28
28
|
}
|
|
29
29
|
toLocalLink(link) {
|
|
30
30
|
var _a, _b;
|
|
@@ -32,7 +32,7 @@ class BaseConverter {
|
|
|
32
32
|
url: link.url,
|
|
33
33
|
title: (_a = link.title) !== null && _a !== void 0 ? _a : link.url,
|
|
34
34
|
description: (_b = link.description) !== null && _b !== void 0 ? _b : undefined,
|
|
35
|
-
type: link.type ? this.toLocalLinkType(link.type) :
|
|
35
|
+
type: link.type ? this.toLocalLinkType(link.type) : "Related",
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
toLocalShortStep(step) {
|
|
@@ -16,6 +16,7 @@ const https_1 = require("https");
|
|
|
16
16
|
const path_1 = require("path");
|
|
17
17
|
const process_1 = require("process");
|
|
18
18
|
const child_process_1 = require("child_process");
|
|
19
|
+
const utils_1 = require("../../common/utils");
|
|
19
20
|
// Generated sync-storage client is bundled into lib/sync-storage/dist during build.
|
|
20
21
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
21
22
|
const SyncStorageClient = require("../../sync-storage/dist/index");
|
|
@@ -106,25 +107,29 @@ class SyncStorageRunner {
|
|
|
106
107
|
sendInProgressTestResult(model) {
|
|
107
108
|
return __awaiter(this, void 0, void 0, function* () {
|
|
108
109
|
if (!this.running || !this.isMaster || this.alreadyInProgress || this.inProgressPublishing) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
110
|
+
if ((0, utils_1.isTmsLoadTestRunDebug)()) {
|
|
111
|
+
console.debug("[syncstorage] skip in-progress cut publish", {
|
|
112
|
+
reason: {
|
|
113
|
+
notRunning: !this.running,
|
|
114
|
+
notMaster: !this.isMaster,
|
|
115
|
+
alreadyInProgress: this.alreadyInProgress,
|
|
116
|
+
publishingInFlight: this.inProgressPublishing,
|
|
117
|
+
},
|
|
118
|
+
workerPid: this.workerPid,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
118
121
|
return false;
|
|
119
122
|
}
|
|
120
123
|
if (!model.projectId || !model.autoTestExternalId || !model.statusCode || !model.statusType) {
|
|
121
124
|
console.warn("Sync storage in-progress payload is incomplete; skipping publish.");
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
if ((0, utils_1.isTmsLoadTestRunDebug)()) {
|
|
126
|
+
console.debug("[syncstorage] incomplete in-progress cut payload", {
|
|
127
|
+
hasProjectId: Boolean(model.projectId),
|
|
128
|
+
hasAutoTestExternalId: Boolean(model.autoTestExternalId),
|
|
129
|
+
hasStatusCode: Boolean(model.statusCode),
|
|
130
|
+
hasStatusType: Boolean(model.statusType),
|
|
131
|
+
});
|
|
132
|
+
}
|
|
128
133
|
return false;
|
|
129
134
|
}
|
|
130
135
|
this.inProgressPublishing = true;
|
|
@@ -138,22 +143,26 @@ class SyncStorageRunner {
|
|
|
138
143
|
});
|
|
139
144
|
yield this.withRetry(() => __awaiter(this, void 0, void 0, function* () { return this.testResultsApi.inProgressTestResultPost(this.testRunId, request); }), SyncStorageRunner.RETRY_COUNT);
|
|
140
145
|
this.alreadyInProgress = true;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
if ((0, utils_1.isTmsLoadTestRunDebug)()) {
|
|
147
|
+
console.debug("[syncstorage] alreadyInProgress set", {
|
|
148
|
+
workerPid: this.workerPid,
|
|
149
|
+
autoTestExternalId: model.autoTestExternalId,
|
|
150
|
+
});
|
|
151
|
+
console.debug("[syncstorage] in-progress cut published", {
|
|
152
|
+
workerPid: this.workerPid,
|
|
153
|
+
autoTestExternalId: model.autoTestExternalId,
|
|
154
|
+
});
|
|
155
|
+
}
|
|
149
156
|
return true;
|
|
150
157
|
}
|
|
151
158
|
catch (error) {
|
|
152
159
|
console.warn(`Sync storage in-progress publish failed: ${error}`);
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
160
|
+
if ((0, utils_1.isTmsLoadTestRunDebug)()) {
|
|
161
|
+
console.debug("[syncstorage] in-progress cut publish failed", {
|
|
162
|
+
workerPid: this.workerPid,
|
|
163
|
+
autoTestExternalId: model.autoTestExternalId,
|
|
164
|
+
});
|
|
165
|
+
}
|
|
157
166
|
return false;
|
|
158
167
|
}
|
|
159
168
|
finally {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testit-js-commons",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1-TMS-5.7",
|
|
4
4
|
"description": "JavaScript commons for Test IT",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"dotenv": "^16.0.3",
|
|
42
|
-
"testit-api-client": "7.2.6"
|
|
42
|
+
"testit-api-client": "7.2.6-TMS-5.7"
|
|
43
43
|
},
|
|
44
44
|
"files": [
|
|
45
45
|
"lib",
|