summaryrefslogtreecommitdiffstats
path: root/java/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2016-11-30 23:12:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2016-11-30 23:12:35 (GMT)
commit65be68a17d1e5bec7e51e5f3e2e03d22163f7817 (patch)
tree4fbed27e66a41c3d8cb6f4f75f30ffe923f9185c /java/test
parent5922bbb45f03b0e84c3aef7e1ed1010273caa7e2 (diff)
downloadhdf5-65be68a17d1e5bec7e51e5f3e2e03d22163f7817.zip
hdf5-65be68a17d1e5bec7e51e5f3e2e03d22163f7817.tar.gz
hdf5-65be68a17d1e5bec7e51e5f3e2e03d22163f7817.tar.bz2
Add some Java methods that were missed earlier.
Diffstat (limited to 'java/test')
-rw-r--r--java/test/JUnit-interface.txt3
-rw-r--r--java/test/TestH5Pfapl.java55
2 files changed, 57 insertions, 1 deletions
diff --git a/java/test/JUnit-interface.txt b/java/test/JUnit-interface.txt
index cbd93e0..05814cd 100644
--- a/java/test/JUnit-interface.txt
+++ b/java/test/JUnit-interface.txt
@@ -496,6 +496,7 @@ JUnit version 4.11
.testH5P_fapl_family
.testH5P_chunk_cache
.testH5P_meta_block_size
+.testH5Fmdc_logging
.testH5Pget_elink_fapl
.testH5Pset_mdc_config
.testH5P_small_data_block_size
@@ -634,7 +635,7 @@ JUnit version 4.11
Time: XXXX
-OK (632 tests)
+OK (633 tests)
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#000: (file name) line (number) in H5Fopen(): can't set access and transfer property lists
diff --git a/java/test/TestH5Pfapl.java b/java/test/TestH5Pfapl.java
index 555afe0..8f15648 100644
--- a/java/test/TestH5Pfapl.java
+++ b/java/test/TestH5Pfapl.java
@@ -1322,4 +1322,59 @@ public class TestH5Pfapl {
}
}
}
+
+ @Test
+ public void testH5Fmdc_logging() {
+ boolean[] mdc_logging_status = {false, false};
+ boolean[] mdc_log_options = {false, false};
+
+ try {
+ boolean is_enabled = true;
+ boolean start_on_access = false;
+ H5.H5Pset_mdc_log_options(fapl_id, is_enabled, H5_LOG_FILE, start_on_access);
+
+ String location = H5.H5Pget_mdc_log_options(fapl_id, mdc_log_options);
+ assertTrue("H5.H5Pget_mdc_log_options: is_enabled", mdc_log_options[0]);
+ assertFalse("H5.H5Pget_mdc_log_options: start_on_access_out", mdc_log_options[1]);
+
+ H5.H5Pset_libver_bounds(fapl_id, HDF5Constants.H5F_LIBVER_LATEST, HDF5Constants.H5F_LIBVER_LATEST);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("mdc_log_option: " + err);
+ }
+ _createH5File(fapl_id);
+
+ try {
+ H5.H5Fget_mdc_logging_status(H5fid, mdc_logging_status);
+ }
+ catch (Throwable err) {
+ fail("H5.H5Fget_mdc_logging_status: " + err);
+ }
+ assertTrue("initial: is_enabled", mdc_logging_status[0]);
+ assertFalse("initial: is_currently_logging", mdc_logging_status[1]);
+
+ try {
+ H5.H5Fstart_mdc_logging(H5fid);
+ H5.H5Fget_mdc_logging_status(H5fid, mdc_logging_status);
+ }
+ catch (Throwable err) {
+ fail("start H5.H5Fget_mdc_logging_status: " + err);
+ }
+ assertTrue("start: is_enabled", mdc_logging_status[0]);
+ assertTrue("start: is_currently_logging", mdc_logging_status[1]);
+
+ try {
+ H5.H5Fstop_mdc_logging(H5fid);
+ H5.H5Fget_mdc_logging_status(H5fid, mdc_logging_status);
+ }
+ catch (Throwable err) {
+ fail("stop H5.H5Fget_mdc_logging_status: " + err);
+ }
+// assertFalse("stop: is_enabled", mdc_logging_status[0]);
+ assertFalse("stop: is_currently_logging", mdc_logging_status[1]);
+
+ deleteH5file();
+ _deleteLogFile();
+ }
}