diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2016-12-02 17:37:03 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2016-12-02 17:37:03 (GMT) |
commit | a0d3801251c45ec3918e2ad9367c6f85022ef997 (patch) | |
tree | 281b1852af4f6df859bc80590b3f3765aa682a77 /java/test | |
parent | 59b730424a4ca568f968b30efe1972ad0d95db0d (diff) | |
parent | 15e04901a0cea65b2b0fa3ca869341a2b656bfdf (diff) | |
download | hdf5-a0d3801251c45ec3918e2ad9367c6f85022ef997.zip hdf5-a0d3801251c45ec3918e2ad9367c6f85022ef997.tar.gz hdf5-a0d3801251c45ec3918e2ad9367c6f85022ef997.tar.bz2 |
Merge pull request #183 in HDFFV/hdf5 from ~KOZIOL/hdf5:develop_swmr_merge to develop
Merged the final library SWMR changes from revise_chunks.
* commit '15e04901a0cea65b2b0fa3ca869341a2b656bfdf':
Bring SWMR support in to the main development branch. (Finally!) More tests and the tool and API wrappers will be coming in over the weekend.
Add some Java methods that were missed earlier.
Minor normalization cleanups.
Diffstat (limited to 'java/test')
-rw-r--r-- | java/test/JUnit-interface.txt | 3 | ||||
-rw-r--r-- | java/test/TestH5Pfapl.java | 55 |
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(); + } } |