File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -159,6 +159,17 @@ func TestQueryCacheStatus(t *testing.T) {
159159 })
160160}
161161
162+ // TestGetCacheHitStates verifies that the GetCacheHitStates method of the AlluxioEngine
163+ // correctly extracts and maps the cache hit metrics from the engine's report.
164+ // It overrides the GetReportMetrics method to return a controlled report, then asserts that
165+ // the returned cache hit state contains the expected values for both local cache hits (bytesReadLocal)
166+ // and unified file system hits (bytesReadUfsAll), ensuring correct metric parsing.
167+ //
168+ // Parameters:
169+ // - t (*testing.T): The testing context used for running and reporting the test.
170+ //
171+ // Returns:
172+ // - None: This test function does not return a value but uses assertions to verify correctness.
162173func TestGetCacheHitStates (t * testing.T ) {
163174 Convey ("Test GetCacheHitStates " , t , func () {
164175 Convey ("with data " , func () {
You can’t perform that action at this time.
0 commit comments