Flush thread gets stuck when input stream of binaries block
Improve synchronisation of blocking blob in test
@@ -295,7 +295,14 @@ public class FileStoreIT {
private int readOrEnd() {
if (blocking.get()) {
+ if (!reading) {
+ readMonitor.enter();
+ try {
reading = true;
+ } finally {
+ readMonitor.leave();
+ }
+ }
return 0;
} else {
return -1;
