()
| 152 | final AtomicBoolean doneWriting = new AtomicBoolean(); |
| 153 | Thread flusher = new Thread(new Runnable() { |
| 154 | @Override |
| 155 | public void run() { |
| 156 | flusherStarted.countDown(); |
| 157 | while (!doneWriting.get()) { |
| 158 | queue.scheduleFlush(); |
| 159 | assertFlushCalledAfterWrites(); |
| 160 | } |
| 161 | // No more writes, so this flush should drain all writes from the queue |
| 162 | queue.scheduleFlush(); |
| 163 | assertFlushCalledAfterWrites(); |
| 164 | } |
| 165 | |
| 166 | void assertFlushCalledAfterWrites() { |
| 167 | synchronized (lock) { |
nothing calls this directly
no test coverage detected