(t *testing.T, fiName string, dur time.Duration)
| 2123 | } |
| 2124 | |
| 2125 | func loggingWaitFile(t *testing.T, fiName string, dur time.Duration) { |
| 2126 | var lastStat os.FileInfo |
| 2127 | require.Eventually(t, func() bool { |
| 2128 | var err error |
| 2129 | lastStat, err = os.Stat(fiName) |
| 2130 | if err != nil { |
| 2131 | if !os.IsNotExist(err) { |
| 2132 | t.Fatalf("unexpected error: %v", err) |
| 2133 | } |
| 2134 | return false |
| 2135 | } |
| 2136 | return lastStat.Size() > 0 |
| 2137 | }, |
| 2138 | dur, //nolint:gocritic |
| 2139 | testutil.IntervalFast, |
| 2140 | "file at %s should exist, last stat: %+v", |
| 2141 | fiName, lastStat, |
| 2142 | ) |
| 2143 | } |
| 2144 | |
| 2145 | func TestServer_Production(t *testing.T) { |
| 2146 | t.Parallel() |
no test coverage detected