Skip to content

Commit 5fc0368

Browse files
committed
tests: increase memory limit in test to prevent unexpected exceptions
1 parent caa031c commit 5fc0368

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/runtime.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,8 @@ fn test_callback_invalid_argcount() {
502502

503503
#[test]
504504
fn memory_limit_exceeded() {
505-
let c = Context::builder().memory_limit(100_000).build().unwrap();
505+
// limit should not be set too low, otherwise there's no memory to even create an exception.
506+
let c = Context::builder().memory_limit(150_000).build().unwrap();
506507
assert_eq!(
507508
c.eval(" 'abc'.repeat(200_000) ", false),
508509
Err(ExecutionError::OutOfMemory),

0 commit comments

Comments
 (0)