conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 14_procedure_signatures / NegSem_1400_procedure_signatures_002.ttcn
1 /******************************************************************************
2 * Copyright (c) 2000-2016 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * Adrien Kirjak – initial implementation
10 *
11 ** @version 0.0.1
12 ** @purpose 1:14, Ensure that blocking calls needs response or exception handling
13 ** @verdict pass reject
14 *****************************************************************/
15 // Multiple calls requires response or exception handling if the signature is blocking
16
17 module NegSem_1400_procedure_signatures_002 {
18
19 signature p_Sig1_001( in charstring key ); // noblock needed for multiple calls without response or exections
20
21 type port remotePort procedure {
22 inout p_Sig1_001;
23 } with {extension "internal"}
24
25 type component GeneralComp {
26 port remotePort PCO;
27 var integer MyComp;
28 }
29
30
31 function f_Server() runs on GeneralComp {
32 timer t_guard;
33
34 const charstring key[3] := {"My String1", "hello", "Probe string"};
35
36 t_guard.start( 5.0 );
37
38 for ( var integer i := 0; i < 3; i := i + 1 ) {
39 PCO.call( p_Sig1_001:{key[i]});}
40 setverdict(pass);
41
42 t_guard.timeout;
43 setverdict(fail);
44 }
45
46 function f_client() runs on GeneralComp {
47
48 }
49
50 testcase TC_NegSem_1400_procedure_signatures_002() runs on GeneralComp system GeneralComp {
51
52 var GeneralComp server := GeneralComp.create("RemoteProcedure Service");
53 var GeneralComp client := GeneralComp.create("RemoteProcedure Client");
54
55
56 connect(server:PCO, client:PCO);
57
58 server.start(f_Server());
59 client.start(f_client());
60
61 alt {
62 [] client.done {
63 server.stop;
64 }
65 }
66
67 alt {
68 [] all component.done {}
69 }
70
71 disconnect(server:PCO, client:PCO);
72 }
73
74 control{
75 execute(TC_NegSem_1400_procedure_signatures_002());
76 }
77
78 }
This page took 0.041411 seconds and 5 git commands to generate.