Skip to content

Commit

Permalink
[SPARK-26286][TEST] Add MAXIMUM_PAGE_SIZE_BYTES exception bound unit …
Browse files Browse the repository at this point in the history
…test

## What changes were proposed in this pull request?
Add MAXIMUM_PAGE_SIZE_BYTES Exception test

## How was this patch tested?
Existing tests

(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)

Please review http://spark.apache.org/contributing.html before opening a pull request.

Closes apache#23226 from wangjiaochun/BytesToBytesMapSuite.

Authored-by: 10087686 <wang.jiaochun@zte.com.cn>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
  • Loading branch information
wangjiaochun authored and jackylee-ch committed Feb 18, 2019
1 parent 40d99e3 commit 8b0bea6
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,17 @@ public void initialCapacityBoundsChecking() {
} catch (IllegalArgumentException e) {
// expected exception
}

try {
new BytesToBytesMap(
taskMemoryManager,
1,
TaskMemoryManager.MAXIMUM_PAGE_SIZE_BYTES + 1);
Assert.fail("Expected IllegalArgumentException to be thrown");
} catch (IllegalArgumentException e) {
// expected exception
}

}

@Test
Expand Down

0 comments on commit 8b0bea6

Please sign in to comment.