diff --git a/OneM2M_Testcases_CSE_Release_2.ttcn b/OneM2M_Testcases_CSE_Release_2.ttcn index de1b093ef039a42895ad7a4f0dc04f5192488e20..55c33fc15d0a37b05dd5a1c72b71a7d423724202 100644 --- a/OneM2M_Testcases_CSE_Release_2.ttcn +++ b/OneM2M_Testcases_CSE_Release_2.ttcn @@ -7548,6 +7548,72 @@ module OneM2M_Testcases_CSE_Release_2 { } } //end group g_CSE_PCH_005 + + /** + * @desc Check that the IUT sends the response with a status to the CSE1 when the request expires according to its Request Expiration Timestamp + * + */ + testcase TC_CSE_PCH_006() runs on Tester system CseSystem { + + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + + v_cse1.start(f_CSE_PCH_006()); + + v_cse1.done; + + } + + function f_CSE_PCH_006() runs on CseSimu { + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var RequestPrimitive v_request; + var MsgIn v_response; + var RequestPrimitive v_requestNotify; + + // Test control + + // Test component configuration + f_cf02UpCseSimuMaster(); + + // Test adapter configuration + + // Preamble + vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase); + + vc_ae1.start(f_cse_preamble_registerAe());//AE1 is registred; + vc_ae1.done; + f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); + v_aeIndex := f_getResource(vc_ae1); + + vc_ae1.start(f_cse_createResource(int15, m_createPollingChannelBase, v_aeIndex));//PollingChannel is created; + vc_ae1.done; + + v_requestNotify := valueof(m_notify(f_getResourceAddress(v_aeIndex))); + v_request.from_ := PX_CSE1_ID; + + mccPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitive(int4108))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ":Response status code set to 4108 (REQUEST_TIMEOUT)"); + } + [] mccPort.receive(mw_response()) { + tc_ac.stop; + setverdict(inconc, __SCOPE__&":INFO: Unexpected message received"); + } + [] tc_ac.timeout { + setverdict(inconc, __SCOPE__&":INFO: No answer while performing notification"); + } + } + + // Postamble + f_cse_postamble_deleteResourcesCSE(); + + // Tear down + f_cf02DownCseSimuMaster(); + } // end f_CSE_PCH_006 }//end group PollingChannel