You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/03/31 12:53:59 UTC

ignite git commit: IGNITE-1632: IGFS: Fixed test which failed with small block size. This closes #590.

Repository: ignite
Updated Branches:
  refs/heads/master ef642e918 -> bbf87df68


IGNITE-1632: IGFS: Fixed test which failed with small block size. This closes #590.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/bbf87df6
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/bbf87df6
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/bbf87df6

Branch: refs/heads/master
Commit: bbf87df681ae0495d4240cbb5d8959b6ea7e5600
Parents: ef642e9
Author: iveselovskiy <iv...@gridgain.com>
Authored: Thu Mar 31 13:53:52 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Mar 31 13:53:52 2016 +0300

----------------------------------------------------------------------
 .../internal/processors/igfs/IgfsAbstractSelfTest.java   | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/bbf87df6/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java
index 748a771..b361d42 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java
@@ -3038,7 +3038,16 @@ public abstract class IgfsAbstractSelfTest extends IgfsCommonAbstractTest {
                 for (byte[] chunk: chunks) {
                     byte[] buf = new byte[chunk.length];
 
-                    read = is.read(buf);
+                    read = 0;
+
+                    while (true) {
+                        int r = is.read(buf, read, buf.length - read);
+
+                        read += r;
+
+                        if (read == buf.length || r <= 0)
+                            break;
+                    }
 
                     assert read == chunk.length : "Chunk #" + chunkIdx + " was not read fully:" +
                             " read=" + read + ", expected=" + chunk.length;