Skip to content

Commit 0db19f1

Browse files
author
joergboe
committed
Add more TVT cases
1 parent b5334bb commit 0db19f1

File tree

3 files changed

+110
-1
lines changed
  • tests/frameworktests/tests/CollectionStreamsxInet

3 files changed

+110
-1
lines changed

tests/frameworktests/tests/CollectionStreamsxInet/Runtests/HTTPRequestProcessBasic/TestCase.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ STEPS=(
1717
'waitForFinAndCheckHealth'
1818
'cancelJobAndLog'
1919
'myEval'
20-
'checkLogsNoError2'
2120
)
2221

2322
FINS='cancelJobAndLog'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
use com.ibm.streamsx.inet.wsserver::WebSocketInject;
2+
3+
public composite Main {
4+
graph
5+
//<0>stream<int32 message> WebsocketStream = WebSocketInject() {}
6+
7+
//<1>stream<rstring messageAttribute> WebsocketStream = WebSocketInject() { param messageAttributeName: "myMessageAttribute"; }
8+
9+
//<2>stream<int64 messageAttribute> WebsocketStream = WebSocketInject() { param messageAttributeName: "messageAttribute"; }
10+
11+
//<3>stream<rstring messageAttribute> WebsocketStream = WebSocketInject() { param messageAttributeName: "messageAttribute"; senderIdAttributeName: "mySenderIdAttribute"; }
12+
13+
//<4>stream<rstring messageAttribute, int64 senderIdAttribute> WebsocketStream = WebSocketInject() { param messageAttributeName: "messageAttribute"; senderIdAttributeName: "senderIdAttribute"; }
14+
15+
config
16+
restartable: false;
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
#--variantCount=2
2+
3+
setCategory quick
4+
5+
function myExplain {
6+
case "$TTRO_variantCase" in
7+
0) echo "variant $TTRO_variantCase - Output port has single attribute with type string";;
8+
1) echo "variant $TTRO_variantCase - Output port has no named attribute myMessageAttribute";;
9+
2) echo "variant $TTRO_variantCase - Output port has named attribute messageAttribute with wrong type";;
10+
3) echo "variant $TTRO_variantCase - Output port has no named attribute mySenderIdAttribute";;
11+
4) echo "variant $TTRO_variantCase - Output port has named attribute senderIdAttribute with wrong type";;
12+
*) printErrorAndExit "invalid variant $TTRO_variantCase";;
13+
esac
14+
}
15+
16+
PREPS=(
17+
'myExplain'
18+
'copyAndMorphSpl'
19+
)
20+
21+
STEPS=(
22+
"splCompile port=8080"
23+
'executeLogAndError output/bin/standalone -t 2'
24+
'myEval'
25+
)
26+
27+
myEval() {
28+
case "$TTRO_variantSuite" in
29+
de_DE)
30+
linewisePatternMatchInterceptAndSuccess "$TT_evaluationFile" "" "${errorCodes_de_DE[$TTRO_variantCase]}";;
31+
fr_FR)
32+
linewisePatternMatchInterceptAndSuccess "$TT_evaluationFile" "" "${errorCodes_fr_FR[$TTRO_variantCase]}";;
33+
it_IT)
34+
linewisePatternMatchInterceptAndSuccess "$TT_evaluationFile" "" "${errorCodes_it_IT[$TTRO_variantCase]}";;
35+
es_ES)
36+
linewisePatternMatchInterceptAndSuccess "$TT_evaluationFile" "" "${errorCodes_es_ES[$TTRO_variantCase]}";;
37+
pt_BR)
38+
linewisePatternMatchInterceptAndSuccess "$TT_evaluationFile" "" "${errorCodes_pt_BR[$TTRO_variantCase]}";;
39+
ja_JP)
40+
linewisePatternMatchInterceptAndSuccess "$TT_evaluationFile" "" "${errorCodes_ja_JP[$TTRO_variantCase]}";;
41+
zh_CN)
42+
linewisePatternMatchInterceptAndSuccess "$TT_evaluationFile" "" "${errorCodes_zh_CN[$TTRO_variantCase]}";;
43+
zh_TW)
44+
linewisePatternMatchInterceptAndSuccess "$TT_evaluationFile" "" "${errorCodes_zh_TW[$TTRO_variantCase]}";;
45+
en_US)
46+
linewisePatternMatchInterceptAndSuccess "$TT_evaluationFile" "" "${errorCodes[$TTRO_variantCase]}";;
47+
esac;
48+
}
49+
50+
errorCodes=(
51+
"*CDIST3866E Port Attribute message must be of type rstring, ustring or blob*"
52+
"*CDIST3856E Could not detect required attribute 'myMessageAttribute' on output port 0. Or specify a valid value for parameter 'messageAttributeName'*"
53+
)
54+
55+
errorCodes_de_DE=(
56+
"*CDIST3866E Das Portattribut message muss den Typ*"
57+
"*CDIST3856E Das erforderliche Attribut*"
58+
)
59+
60+
errorCodes_fr_FR=(
61+
"*CDIST3866E L'attribut de port message doit être de type*"
62+
"*CDIST3856E Impossible de détecter l'attribut*"
63+
)
64+
65+
errorCodes_it_IT=(
66+
"*CDIST3866E L'attributo della porta message deve essere di tipo*"
67+
"*CDIST3856E Impossibile rilevare l'attributo richiesto*"
68+
)
69+
70+
errorCodes_es_ES=(
71+
"*CDIST3866E El atributo de puerto message debe ser de tipo*"
72+
"*CDIST3856E No se pudo detectar el atributo necesario*"
73+
)
74+
75+
errorCodes_pt_BR=(
76+
"*CDIST3866E O atributo de porta message deve ser do tipo*"
77+
"*CDIST3856E Não foi possível detectar o atributo necessário*"
78+
)
79+
80+
errorCodes_ja_JP=(
81+
"*CDIST3866E ポート属性*"
82+
"*CDIST3856E output ポート 0 に必須属性*"
83+
)
84+
85+
errorCodes_zh_CN=(
86+
"*CDIST3866E 端口属性*"
87+
"*CDIST3856E 无法检测*"
88+
)
89+
90+
errorCodes_zh_TW=(
91+
"*CDIST3866E 埠屬性*"
92+
"*CDIST3856E 在*"
93+
)

0 commit comments

Comments
 (0)