fmt.Fprintf(os.Stdout,"+++ %s is a slow test (took %v)\n",fmt.Formatter(log.NewColoredValue(t.Name(),log.Bold,log.FgYellow)),fmt.Formatter(log.NewColoredValue(took,log.Bold,log.FgYellow)))
}else{
fmt.Fprintf(os.Stdout,"+++ %s is a slow tets (took %v)\n",t.Name(),took)
}
}
timer:=time.AfterFunc(slowFlush,func(){
iflog.CanColorStdout{
fmt.Fprintf(os.Stdout,"+++ %s ... still flushing after %v ...\n",fmt.Formatter(log.NewColoredValue(t.Name(),log.Bold,log.FgRed)),slowFlush)
}else{
fmt.Fprintf(os.Stdout,"+++ %s ... still flushing after %v ...\n",t.Name(),slowFlush)
t.Errorf("Flushing queues failed with error %v",err)
}
timer.Stop()
flushTook:=time.Since(start)-took
ifflushTook>slowFlush{
iflog.CanColorStdout{
fmt.Fprintf(os.Stdout,"+++ %s had a slow clean-up flush (took %v)\n",fmt.Formatter(log.NewColoredValue(t.Name(),log.Bold,log.FgRed)),fmt.Formatter(log.NewColoredValue(flushTook,log.Bold,log.FgRed)))
}else{
fmt.Fprintf(os.Stdout,"+++ %s had a slow clean-up flush (took %v)\n",t.Name(),flushTook)