Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A940018A15 for ; Wed, 6 Apr 2016 07:55:06 +0000 (UTC) Received: (qmail 66512 invoked by uid 500); 6 Apr 2016 07:55:06 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 66412 invoked by uid 500); 6 Apr 2016 07:55:06 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 66107 invoked by uid 99); 6 Apr 2016 07:55:06 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Apr 2016 07:55:06 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4FE56E983B; Wed, 6 Apr 2016 07:55:06 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ntikhonov@apache.org To: commits@ignite.apache.org Date: Wed, 06 Apr 2016 07:55:19 -0000 Message-Id: <418da59ec5984d248fbde1362f75448e@git.apache.org> In-Reply-To: <2aa8831670f14c30abc23165697f9659@git.apache.org> References: <2aa8831670f14c30abc23165697f9659@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [14/50] [abbrv] ignite git commit: IGNITE-1632: IGFS: Fixed test which failed with small block size. This closes #590. 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/ignite-2630 Commit: bbf87df681ae0495d4240cbb5d8959b6ea7e5600 Parents: ef642e9 Author: iveselovskiy Authored: Thu Mar 31 13:53:52 2016 +0300 Committer: vozerov-gridgain 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;