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