diff options
| author | kmu <kmu@hdfgroup.org> | 2020-01-21 02:47:48 (GMT) |
|---|---|---|
| committer | kmu <kmu@hdfgroup.org> | 2020-01-21 02:47:48 (GMT) |
| commit | a95b5b1e056e171702ad41b69cb796da0cbb91eb (patch) | |
| tree | efeac251757e78e1fcef89356e7c56f240279d45 /java/test/TestH5E.java | |
| parent | 7e93acd94f20c73d27bb2eb4f7b4389d88cfb299 (diff) | |
| parent | a63f22e27cad74c9bb98ca2b4d2a5fd118ef3571 (diff) | |
| download | hdf5-a95b5b1e056e171702ad41b69cb796da0cbb91eb.zip hdf5-a95b5b1e056e171702ad41b69cb796da0cbb91eb.tar.gz hdf5-a95b5b1e056e171702ad41b69cb796da0cbb91eb.tar.bz2 | |
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/hdffv/hdf5 into develop
Diffstat (limited to 'java/test/TestH5E.java')
| -rw-r--r-- | java/test/TestH5E.java | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/java/test/TestH5E.java b/java/test/TestH5E.java index fd015c0..6f4f473 100644 --- a/java/test/TestH5E.java +++ b/java/test/TestH5E.java @@ -74,7 +74,6 @@ public class TestH5E { @Test public void testH5Eget_msg_major() { - try { H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT); } @@ -90,8 +89,17 @@ public class TestH5E { fail("H5.H5Eget_msg(Throwable): " + err); } assertNotNull("H5.H5Eget_msg: " + msg, msg); - assertEquals("H5.H5Eget_msg: ", "File accessibility", msg); assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MAJOR, error_msg_type[0]); + + /* + * If HDF5_VOL_CONNECTOR is set, this might not be the + * native connector and the error string might be different. + * Only check for the specific error message if the native + * connector is being used. + */ + String connector = System.getenv("HDF5_VOL_CONNECTOR"); + if (connector == null) + assertEquals("H5.H5Eget_msg: ", "File accessibility", msg); } catch (Throwable err) { err.printStackTrace(); @@ -116,8 +124,17 @@ public class TestH5E { fail("H5.H5Eget_msg: " + err); } assertNotNull("H5.H5Eget_msg: " + msg, msg); - assertEquals("H5.H5Eget_msg: ", "Unable to open file", msg); assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MINOR, error_msg_type[0]); + + /* + * If HDF5_VOL_CONNECTOR is set, this might not be the + * native connector and the error string might be different. + * Only check for the specific error message if the native + * connector is being used. + */ + String connector = System.getenv("HDF5_VOL_CONNECTOR"); + if (connector == null) + assertEquals("H5.H5Eget_msg: ", "Unable to open file", msg); } catch (Throwable err) { err.printStackTrace(); |
