Skip to content

Commit

Permalink
ignore some tests when miri is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove committed Jul 5, 2024
1 parent abf91b4 commit 5faf167
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions core/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,7 @@ mod tests {
}

#[test]
#[cfg_attr(miri, ignore)]
pub fn error_from_panic() {
let _guard = attach_current_thread();
let mut env = jvm().get_env().unwrap();
Expand All @@ -604,6 +605,7 @@ mod tests {
// Verify that functions that return an object are handled correctly. This is basically
// a test of the "happy path".
#[test]
#[cfg_attr(miri, ignore)]
pub fn object_result() {
let _guard = attach_current_thread();
let mut env = jvm().get_env().unwrap();
Expand All @@ -621,6 +623,7 @@ mod tests {
// Verify that functions that return an native time are handled correctly. This is basically
// a test of the "happy path".
#[test]
#[cfg_attr(miri, ignore)]
pub fn jlong_result() {
let _guard = attach_current_thread();
let mut env = jvm().get_env().unwrap();
Expand All @@ -637,6 +640,7 @@ mod tests {
// Verify that functions that return an array can handle throwing exceptions. The test
// causes an exception by dividing by zero.
#[test]
#[cfg_attr(miri, ignore)]
pub fn jlong_panic_exception() {
let _guard = attach_current_thread();
let mut env = jvm().get_env().unwrap();
Expand All @@ -657,6 +661,7 @@ mod tests {
// Verify that functions that return an native time are handled correctly. This is basically
// a test of the "happy path".
#[test]
#[cfg_attr(miri, ignore)]
pub fn jlong_result_ok() {
let _guard = attach_current_thread();
let mut env = jvm().get_env().unwrap();
Expand All @@ -673,6 +678,7 @@ mod tests {
// Verify that functions that return an native time are handled correctly. This is basically
// a test of the "happy path".
#[test]
#[cfg_attr(miri, ignore)]
pub fn jlong_result_err() {
let _guard = attach_current_thread();
let mut env = jvm().get_env().unwrap();
Expand All @@ -693,6 +699,7 @@ mod tests {
// Verify that functions that return an array are handled correctly. This is basically
// a test of the "happy path".
#[test]
#[cfg_attr(miri, ignore)]
pub fn jint_array_result() {
let _guard = attach_current_thread();
let mut env = jvm().get_env().unwrap();
Expand All @@ -713,6 +720,7 @@ mod tests {
// Verify that functions that return an array can handle throwing exceptions. The test
// causes an exception by dividing by zero.
#[test]
#[cfg_attr(miri, ignore)]
pub fn jint_array_panic_exception() {
let _guard = attach_current_thread();
let mut env = jvm().get_env().unwrap();
Expand All @@ -736,6 +744,7 @@ mod tests {
/// See [`object_panic_exception`] for a test which involves generating a panic and verifying
/// that the resulting stack trace includes the offending call.
#[test]
#[cfg_attr(miri, ignore)]
pub fn stacktrace_string() {
// Setup: Start with a backtrace that includes all of the expected scenarios, including
// cases where the file and location are not provided as part of the backtrace capture
Expand Down
2 changes: 1 addition & 1 deletion core/src/execution/datafusion/spark_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub(crate) fn spark_compatible_murmur3_hash<T: AsRef<[u8]>>(data: T, seed: u32)
unsafe {
let mut h1 = if len_aligned > 0 {
hash_bytes_by_int(
std::slice::from_raw_parts(data.get_unchecked(0), len_aligned),
&data[0..len_aligned],
seed,
)
} else {
Expand Down

0 comments on commit 5faf167

Please sign in to comment.