Test for resource leaks related to TensorFlow session closing requirements when loading and unloading large numbers of SavedModelBundles. TODO(sukritiramesh): Increase run iterations and move outside of the test suite.
| 101 | // TODO(sukritiramesh): Increase run iterations and move outside of the test |
| 102 | // suite. |
| 103 | TEST_F(LoaderTest, ResourceLeakTest) { |
| 104 | SavedModelBundle bundle; |
| 105 | SessionOptions session_options; |
| 106 | RunOptions run_options; |
| 107 | |
| 108 | const string export_dir = |
| 109 | io::JoinPath(testing::TensorFlowSrcRoot(), kTestDataSharded); |
| 110 | for (int i = 0; i < 100; ++i) { |
| 111 | TF_ASSERT_OK(LoadSavedModel(session_options, run_options, export_dir, |
| 112 | {kSavedModelTagServe}, &bundle)); |
| 113 | CheckSavedModelBundle(export_dir, bundle); |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | TEST_F(LoaderTest, TagMatch) { |
| 118 | SavedModelBundle bundle; |
nothing calls this directly
no test coverage detected