diff --git a/lib/test-server/client/slave-client.js b/lib/test-server/client/slave-client.js
index 023807a..04d14ea 100644
--- a/lib/test-server/client/slave-client.js
+++ b/lib/test-server/client/slave-client.js
@@ -187,7 +187,9 @@
var checkTaskExecutionId = function (scope, name) {
var res = currentTask && scope.__taskExecutionId === currentTask.taskExecutionId;
if (!res) {
- log("warning ignoring call to attester." + name + " for a task that is not valid.");
+ var message = "ignoring call to attester." + name + " for a task that is not (or no longer) valid.";
+ reportLogToServer("warn", [message]);
+ log("warning " + message);
}
return res;
};
diff --git a/lib/test-server/slave-server.js b/lib/test-server/slave-server.js
index 9e0fde9..99aca3f 100644
--- a/lib/test-server/slave-server.js
+++ b/lib/test-server/slave-server.js
@@ -201,12 +201,12 @@ Slave.prototype.assignTask = function (campaign, task) {
Slave.prototype.onTestUpdate = function (event, taskExecutionId) {
var eventName = event.event;
- if (eventName == "error" && this.config.taskRestartOnFailure) {
- this.currentTaskRestartPlanned = true;
+ if (!this.checkTaskExecutionId(taskExecutionId, eventName)) {
+ return;
}
if (allowedTestUpdateEvents.hasOwnProperty(eventName)) {
- if (!this.checkTaskExecutionId(taskExecutionId)) {
- return;
+ if (eventName == "error" && this.config.taskRestartOnFailure) {
+ this.currentTaskRestartPlanned = true;
}
feedEventWithTaskData(event, this.currentTask);
this.currentCampaign.addResult(event);
@@ -257,14 +257,18 @@ Slave.prototype.onClientLog = function (event, taskExecutionId) {
};
Slave.prototype.onTaskFinished = function (taskExecutionId) {
- if (!this.checkTaskExecutionId(taskExecutionId)) {
+ if (!this.checkTaskExecutionId(taskExecutionId, "taskFinished")) {
return;
}
campaignTaskFinished(this);
};
-Slave.prototype.checkTaskExecutionId = function (taskExecutionId) {
- return taskExecutionId === this.taskExecutionId;
+Slave.prototype.checkTaskExecutionId = function (taskExecutionId, eventName) {
+ var res = taskExecutionId === this.taskExecutionId;
+ if (!res) {
+ this.logger.logWarn("Ignoring %s event from a previous task, not filtered by the client.", [eventName]);
+ }
+ return res;
};
Slave.prototype.disconnect = function () {