| 69 | } |
| 70 | |
| 71 | func TestLoggerUniqueness(t *testing.T) { |
| 72 | ctxA := context.Background() |
| 73 | ctxB := context.Background() |
| 74 | |
| 75 | loggerA, _ := LoggerFor(ctxA) |
| 76 | defer loggerA.Close() |
| 77 | defer os.Remove(loggerA.LogFile()) |
| 78 | |
| 79 | loggerB, _ := LoggerFor(ctxB) |
| 80 | defer loggerB.Close() |
| 81 | defer os.Remove(loggerB.LogFile()) |
| 82 | |
| 83 | assert.NotEqual(t, loggerA.(*logger).id, loggerB.(*logger).id) |
| 84 | assert.NotEqual(t, loggerA.LogFile(), loggerB.LogFile()) |
| 85 | } |
| 86 | |
| 87 | func TestLoggerIsolation(t *testing.T) { |
| 88 | ctxA := context.Background() |