ci: add translator action (#1441)

This commit is contained in:
Kevin Wan
2022-01-12 17:57:39 +08:00
committed by GitHub
parent 9b592b3dee
commit b9b80c068b
2 changed files with 31 additions and 0 deletions

View File

@@ -266,6 +266,19 @@ func TestMapReduce(t *testing.T) {
}
}
func TestMapReducePanicBothMapperAndReducer(t *testing.T) {
defer goleak.VerifyNone(t)
_, _ = MapReduce(func(source chan<- interface{}) {
source <- 0
source <- 1
}, func(item interface{}, writer Writer, cancel func(error)) {
panic("foo")
}, func(pipe <-chan interface{}, writer Writer, cancel func(error)) {
panic("bar")
})
}
func TestMapReduceWithReduerWriteMoreThanOnce(t *testing.T) {
defer goleak.VerifyNone(t)