|
@@
-60,6
+60,7
using Validators = std::vector<std::shared_ptr<IFuzzingValidator> >;
|
|
60
|
// ///////// //
|
|
60
|
// ///////// //
|
|
61
|
|
|
61
|
|
|
62
|
// Defaults values used when the associated properties have not been set for the test
|
|
62
|
// Defaults values used when the associated properties have not been set for the test
|
|
|
|
|
63
|
const auto ACQUISITION_TIMEOUT_DEFAULT_VALUE = 30000;
|
|
63
|
const auto NB_MAX_OPERATIONS_DEFAULT_VALUE = 100;
|
|
64
|
const auto NB_MAX_OPERATIONS_DEFAULT_VALUE = 100;
|
|
64
|
const auto NB_MAX_SYNC_GROUPS_DEFAULT_VALUE = 1;
|
|
65
|
const auto NB_MAX_SYNC_GROUPS_DEFAULT_VALUE = 1;
|
|
65
|
const auto NB_MAX_VARIABLES_DEFAULT_VALUE = 1;
|
|
66
|
const auto NB_MAX_VARIABLES_DEFAULT_VALUE = 1;
|
|
@@
-195,7
+196,7
public:
|
|
195
|
nextValidationCounter = RandomGenerator::instance().generateInt(
|
|
196
|
nextValidationCounter = RandomGenerator::instance().generateInt(
|
|
196
|
validationFrequencies().first, validationFrequencies().second);
|
|
197
|
validationFrequencies().first, validationFrequencies().second);
|
|
197
|
qCInfo(LOG_TestAmdaFuzzing()).noquote()
|
|
198
|
qCInfo(LOG_TestAmdaFuzzing()).noquote()
|
|
198
|
<< "Next validation in " << nextValidationCounter << "operations...";
|
|
199
|
<< "Next validation in " << nextValidationCounter << "operation(s)...";
|
|
199
|
};
|
|
200
|
};
|
|
200
|
updateValidationCounter();
|
|
201
|
updateValidationCounter();
|
|
201
|
|
|
202
|
|
|
@@
-218,21
+219,28
public:
|
|
218
|
auto variableId = variableOperation.first;
|
|
219
|
auto variableId = variableOperation.first;
|
|
219
|
auto fuzzingOperation = variableOperation.second;
|
|
220
|
auto fuzzingOperation = variableOperation.second;
|
|
220
|
|
|
221
|
|
|
|
|
|
222
|
auto waitAcquisition = nextValidationCounter == 0;
|
|
|
|
|
223
|
|
|
221
|
fuzzingOperation->execute(variableId, m_FuzzingState, m_VariableController,
|
|
224
|
fuzzingOperation->execute(variableId, m_FuzzingState, m_VariableController,
|
|
222
|
m_Properties);
|
|
225
|
m_Properties);
|
|
223
|
|
|
226
|
|
|
224
|
// Delays the next operation with a randomly generated time
|
|
227
|
if (waitAcquisition) {
|
|
225
|
auto delay = RandomGenerator::instance().generateInt(operationDelays().first,
|
|
228
|
qCDebug(LOG_TestAmdaFuzzing()) << "Waiting for acquisition to finish...";
|
|
226
|
operationDelays().second);
|
|
229
|
SignalWaiter{m_VariableController, SIGNAL(acquisitionFinished())}.wait(
|
|
227
|
qCDebug(LOG_TestAmdaFuzzing())
|
|
230
|
acquisitionTimeout());
|
|
228
|
<< "Waiting " << delay << "ms before the next operation...";
|
|
|
|
|
229
|
QTest::qWait(delay);
|
|
|
|
|
230
|
|
|
231
|
|
|
231
|
// Validates variables
|
|
232
|
// Validates variables
|
|
232
|
if (nextValidationCounter == 0) {
|
|
|
|
|
233
|
validate(m_FuzzingState.m_VariablesPool, validators());
|
|
233
|
validate(m_FuzzingState.m_VariablesPool, validators());
|
|
234
|
updateValidationCounter();
|
|
234
|
updateValidationCounter();
|
|
235
|
}
|
|
235
|
}
|
|
|
|
|
236
|
else {
|
|
|
|
|
237
|
// Delays the next operation with a randomly generated time
|
|
|
|
|
238
|
auto delay = RandomGenerator::instance().generateInt(operationDelays().first,
|
|
|
|
|
239
|
operationDelays().second);
|
|
|
|
|
240
|
qCDebug(LOG_TestAmdaFuzzing())
|
|
|
|
|
241
|
<< "Waiting " << delay << "ms before the next operation...";
|
|
|
|
|
242
|
QTest::qWait(delay);
|
|
|
|
|
243
|
}
|
|
236
|
}
|
|
244
|
}
|
|
237
|
else {
|
|
245
|
else {
|
|
238
|
qCInfo(LOG_TestAmdaFuzzing()).noquote()
|
|
246
|
qCInfo(LOG_TestAmdaFuzzing()).noquote()
|