add more tests

This commit is contained in:
kevin
2020-08-22 23:08:33 +08:00
parent 59ba4ecc5b
commit b82c02ed16
5 changed files with 167 additions and 6 deletions

View File

@@ -23,9 +23,9 @@ func TestStreamCrashInterceptor(t *testing.T) {
func TestUnaryCrashInterceptor(t *testing.T) {
interceptor := UnaryCrashInterceptor()
_, err := interceptor(context.Background(), nil, nil, func(
ctx context.Context, req interface{}) (interface{}, error) {
panic("mock panic")
})
_, err := interceptor(context.Background(), nil, nil,
func(ctx context.Context, req interface{}) (interface{}, error) {
panic("mock panic")
})
assert.NotNil(t, err)
}