Skip to content

Commit d189c05

Browse files
author
Andy Flury
committed
update test cases
1 parent b026638 commit d189c05

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/main/java/org/influxdb/impl/InfluxDBImpl.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import retrofit2.Retrofit;
3535
import retrofit2.converter.moshi.MoshiConverterFactory;
3636

37+
import java.io.EOFException;
3738
import java.io.IOException;
3839
import java.net.DatagramPacket;
3940
import java.net.DatagramSocket;
@@ -361,6 +362,8 @@ public void onResponse(final Call<ResponseBody> call, final Response<ResponseBod
361362
try (ResponseBody errorBody = response.errorBody()) {
362363
throw new RuntimeException(errorBody.string());
363364
}
365+
} catch (EOFException e) {
366+
// do nothing
364367
} catch (IOException e) {
365368
throw new RuntimeException(e);
366369
}
@@ -369,7 +372,6 @@ public void onResponse(final Call<ResponseBody> call, final Response<ResponseBod
369372
@Override
370373
public void onFailure(final Call<ResponseBody> call, final Throwable t) {
371374
throw new RuntimeException(t);
372-
373375
}
374376
});
375377
}

src/test/java/org/influxdb/InfluxDBTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ public void accept(QueryResult result) {
521521
}
522522
}});
523523
this.influxDB.deleteDatabase(dbName);
524-
Assert.assertTrue(countDownLatch.await(1, TimeUnit.SECONDS));
524+
Assert.assertTrue(countDownLatch.await(10, TimeUnit.SECONDS));
525525
}
526526

527527
/**
@@ -542,7 +542,7 @@ public void accept(QueryResult result) {
542542
}
543543
});
544544
this.influxDB.deleteDatabase(dbName);
545-
Assert.assertFalse(countDownLatch.await(1, TimeUnit.SECONDS));
545+
Assert.assertFalse(countDownLatch.await(10, TimeUnit.SECONDS));
546546
}
547547

548548
}

0 commit comments

Comments
 (0)