TranslogTests.testWithRandomException ignored a possible simulated OOM when trimming files

This commit is contained in:
Boaz Leskes 2017-06-12 08:32:55 +02:00
parent cfb5f6a5a6
commit f34136eda4
1 changed files with 2 additions and 0 deletions

View File

@ -2117,6 +2117,8 @@ public class TranslogTests extends ESTestCase {
// fair enough
} catch (IOException ex) {
assertEquals(ex.getMessage(), "__FAKE__ no space left on device");
} catch (RuntimeException ex) {
assertEquals(ex.getMessage(), "simulated");
} finally {
Checkpoint checkpoint = Translog.readCheckpoint(config.getTranslogPath());
if (checkpoint.numOps == unsynced.size() + syncedDocs.size()) {