File tree Expand file tree Collapse file tree 3 files changed +19
-6
lines changed
Expand file tree Collapse file tree 3 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,13 @@ function start_contract_test ()
7272 result=0
7373 npm run hh:test || result=$?
7474 cd -
75+
76+ if [[ " $OSTYPE " == " linux-gnu" * ]]; then
77+ echo " Test local network connection using nc"
78+ sudo apt-get update && sudo apt-get install -y netcat-traditional
79+ nc -zv 127.0.0.1 50211
80+ fi
81+
7582 if [[ $result -ne 0 ]]; then
7683 echo " Smart contract test failed with exit code $result "
7784 log_and_exit $result
@@ -159,6 +166,11 @@ function log_and_exit()
159166 cat relay.log || true
160167 echo " ------- END RELAY DUMP -------"
161168
169+ echo " ------- BEGIN MIRROR REST DUMP -------"
170+ kubectl get services -n " ${SOLO_NAMESPACE} " --output=name | grep rest | grep -v ' \-restjava' | xargs -IREST kubectl logs -n " ${SOLO_NAMESPACE} " REST > rest.log || true
171+ cat rest.log || true
172+ echo " ------- END MIRROR REST DUMP -------"
173+
162174 echo " ------- Last port-forward check -------" >> port-forward.log
163175 ps -ef | grep port-forward >> port-forward.log
164176
193205create_test_account " ${SOLO_DEPLOYMENT} "
194206clone_smart_contract_repo
195207setup_smart_contract_test
196- start_background_transactions
197208check_port_forward
198209start_contract_test
199210start_sdk_test " ${REALM_NUM} " " ${SHARD_NUM} "
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ async function main() {
7272 console . log ( `topic id = ${ createReceipt . topicId . toString ( ) } ` ) ;
7373
7474 console . log ( 'Wait to create subscribe to new topic' ) ;
75- await sleep ( 25000 ) ;
75+ await sleep ( 3000 ) ;
7676
7777 // Create a subscription to the topic
7878 const mirrorClient = ( await Client . forMirrorNetwork ( mirrorNetwork ) ) . setOperator (
@@ -84,8 +84,6 @@ async function main() {
8484 let finished = false ;
8585 new TopicMessageQuery ( )
8686 . setTopicId ( createReceipt . topicId )
87- . setMaxAttempts ( 400 )
88- . setLimit ( 1 )
8987 // eslint-disable-next-line no-unused-vars
9088 . subscribe (
9189 mirrorClient ,
@@ -103,6 +101,8 @@ async function main() {
103101 } ,
104102 ) ;
105103
104+ await sleep ( 3000 ) ;
105+
106106 // send one message
107107 let topicMessageSubmitTransaction = await new TopicMessageSubmitTransaction ( {
108108 topicId : createReceipt . topicId ,
@@ -150,7 +150,7 @@ async function main() {
150150 } ) ;
151151 } ) ;
152152 req . on ( 'error' , e => {
153- console . log ( `problem with request: ${ e . message } ` ) ;
153+ console . log ( `problem with request, message = : ${ e . message } cause = : ${ e . cause } ` ) ;
154154 } ) ;
155155 req . end ( ) ; // make the request
156156 // wait and try again
Original file line number Diff line number Diff line change @@ -179,9 +179,11 @@ export class MirrorNodeTest extends BaseCommandTest {
179179 const transactionsEndpoint : string = 'http://localhost:5551/api/v1/transactions' ;
180180 const firstResponse = await fetch ( transactionsEndpoint ) ;
181181 const firstData = await firstResponse . json ( ) ;
182- await sleep ( Duration . ofSeconds ( 10 ) ) ;
182+ console . log ( `firstData = ${ JSON . stringify ( firstData , null , 2 ) } ` ) ;
183+ await sleep ( Duration . ofSeconds ( 15 ) ) ;
183184 const secondResponse = await fetch ( transactionsEndpoint ) ;
184185 const secondData = await secondResponse . json ( ) ;
186+ console . log ( `secondData = ${ JSON . stringify ( secondData , null , 2 ) } ` ) ;
185187 expect ( firstData . transactions ) . to . not . be . undefined ;
186188 expect ( firstData . transactions . length ) . to . be . gt ( 0 ) ;
187189 expect ( secondData . transactions ) . to . not . be . undefined ;
You can’t perform that action at this time.
0 commit comments