You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/10/05 06:36:49 UTC

[GitHub] [dubbo-go] cjphaha commented on a change in pull request #1483: Ftr: add fatal method for logger(1.5 branch)

cjphaha commented on a change in pull request #1483:
URL: https://github.com/apache/dubbo-go/pull/1483#discussion_r721929410



##########
File path: common/logger/logger_test.go
##########
@@ -19,15 +19,21 @@ package logger
 
 import (
 	"fmt"
+	"os"
 	"path/filepath"
 	"runtime"
 	"testing"
 )
 
 import (
+	"bou.ke/monkey"

Review comment:
       参考这里的解决办法 https://stackoverflow.com/a/33404435/14335149 在单测中重新调用单测,可以对 Fatal 这种内部调用了 os.Exit(1) 的方法进行单测(不会导致 ut 失败),相比较于 monkey 更简单一些,。




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org