目前我正在使用以下命令運(yùn)行我的測(cè)試,并在測(cè)試調(diào)用期間給出超時(shí)值。去測(cè)試 myModule -run TestSanity -v --race-timeout 10hGolang 測(cè)試模塊中有沒有辦法在程序執(zhí)行期間設(shè)置它。就像是,func TestMain(m *testing.M) { // customTimeout = "10h" // m.Timeout(customTimeout) <--- Something like this code := m.Run() os.Exit(code)}
有沒有辦法動(dòng)態(tài)設(shè)置測(cè)試超時(shí)值
函數(shù)式編程
2023-03-29 17:25:02
