add test for new api
This commit is contained in:
parent
ac03c01e4a
commit
a48a6a168a
@ -806,6 +806,11 @@ workflows:
|
||||
suite: itest-gateway
|
||||
target: "./itests/gateway_test.go"
|
||||
|
||||
- test:
|
||||
name: test-itest-get_messages_in_ts
|
||||
suite: itest-get_messages_in_ts
|
||||
target: "./itests/get_messages_in_ts_test.go"
|
||||
|
||||
- test:
|
||||
name: test-itest-multisig
|
||||
suite: itest-multisig
|
||||
|
@ -39,14 +39,14 @@ func TestChainGetMessagesInTs(t *testing.T) {
|
||||
|
||||
waitAllCh := make(chan struct{})
|
||||
go func() {
|
||||
headChangeCh , err := client.ChainNotify(ctx)
|
||||
headChangeCh, err := client.ChainNotify(ctx)
|
||||
require.NoError(t, err)
|
||||
<- headChangeCh //skip hccurrent
|
||||
<-headChangeCh //skip hccurrent
|
||||
|
||||
count := 0
|
||||
for {
|
||||
select {
|
||||
case headChanges := <- headChangeCh:
|
||||
case headChanges := <-headChangeCh:
|
||||
for _, change := range headChanges {
|
||||
if change.Type == store.HCApply {
|
||||
msgs, err := client.ChainGetMessagesInTipset(ctx, change.Val.Key())
|
||||
@ -78,9 +78,9 @@ func TestChainGetMessagesInTs(t *testing.T) {
|
||||
}
|
||||
|
||||
select {
|
||||
case <- waitAllCh:
|
||||
case <- time.After(time.Minute):
|
||||
t.Errorf("timeout to wait for pack messages")
|
||||
case <-waitAllCh:
|
||||
case <-time.After(time.Minute):
|
||||
t.Errorf("timeout to wait for pack messages")
|
||||
}
|
||||
|
||||
for _, sm := range sms {
|
||||
|
Loading…
Reference in New Issue
Block a user