From da2e30bd314466db5f887d61c7ed7be05ca06f2c Mon Sep 17 00:00:00 2001 From: garciay Date: Thu, 17 Mar 2016 10:33:56 +0000 Subject: [PATCH] STF507 week#11: Enforce f_waitForCertificate Build with TCT3 --- ttcn/AtsSecurity/ItsSecurity_TestCases.ttcn3 | 27 +++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/ttcn/AtsSecurity/ItsSecurity_TestCases.ttcn3 b/ttcn/AtsSecurity/ItsSecurity_TestCases.ttcn3 index b1c64933e..688c1d27d 100644 --- a/ttcn/AtsSecurity/ItsSecurity_TestCases.ttcn3 +++ b/ttcn/AtsSecurity/ItsSecurity_TestCases.ttcn3 @@ -190,7 +190,10 @@ module ItsSecurity_TestCases { // execution will be stopped if cert is not received during tc_ac log("*** " & testcasename() & ": INFO: Waiting for the message containing certificate ***"); tc_ac.start; - f_waitForCertificate(v_cert); + if (not f_waitForCertificate(v_cert)) { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_timeout); + } tc_ac.stop; if (v_cert.subject_info.subject_type != e_authorization_ticket) { log("*** " & testcasename() & ": FAIL: received certificate is not an AT certificate ***"); @@ -1619,7 +1622,7 @@ module ItsSecurity_TestCases { log("*** " & testcasename() & ": PASS: Generation time matches current time ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } else { - log("*** " & testcasename() & ": FAIL: Generation time does not match current time " & int2str(v_currentTime) & " . ***"); + log("*** " & testcasename() & ": FAIL: Generation time does not match current time " & int2str(v_currentTime-v_lowerBound) & " / " & int2str(v_upperBound - v_currentTime) & " . ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } @@ -4669,7 +4672,10 @@ module ItsSecurity_TestCases { // Test body tc_ac.start; - f_waitForCertificate(v_cert); + if (not f_waitForCertificate(v_cert)) { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_timeout); + } tc_ac.stop; if (f_getCertificateValidityRestriction(v_cert, e_region, v_vr)) { if (v_vr.validity.region.region_type == e_rectangle) { @@ -4901,7 +4907,10 @@ module ItsSecurity_TestCases { // Test body tc_ac.start; - f_waitForCertificate(v_cert); + if (not f_waitForCertificate(v_cert)) { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_timeout); + } tc_ac.stop; if (f_getCertificateValidityRestriction(v_cert, e_region, v_vr)) { if (v_vr.validity.region.region_type == e_polygon) { @@ -5123,7 +5132,10 @@ module ItsSecurity_TestCases { // Test body tc_ac.start; - f_waitForCertificate(v_cert); + if (not f_waitForCertificate(v_cert)) { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_timeout); + } tc_ac.stop; if (f_getCertificateValidityRestriction(v_cert, e_region, v_vr)) { if (v_vr.validity.region.region_type == e_id) { @@ -6229,7 +6241,10 @@ module ItsSecurity_TestCases { // Check that the AT cert in the first message is signed with the AA cert log("*** " & testcasename() & ": INFO: Waiting for the message containing certificate ***"); tc_ac.start; - f_waitForCertificate(v_at_cert); + if (not f_waitForCertificate(v_at_cert)) { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_timeout); + } tc_ac.stop; if (true != f_getCertificateSignerInfo(v_at_cert, v_si)) { -- GitLab