Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions pkg/ddc/alluxio/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,17 @@ func TestQueryCacheStatus(t *testing.T) {
})
}

// TestGetCacheHitStates verifies that the GetCacheHitStates method of the AlluxioEngine
// correctly extracts and maps the cache hit metrics from the engine's report.
// It overrides the GetReportMetrics method to return a controlled report, then asserts that
// the returned cache hit state contains the expected values for both local cache hits (bytesReadLocal)
// and unified file system hits (bytesReadUfsAll), ensuring correct metric parsing.
//
// Parameters:
// - t (*testing.T): The testing context used for running and reporting the test.
//
// Returns:
// - None: This test function does not return a value but uses assertions to verify correctness.
func TestGetCacheHitStates(t *testing.T) {
Convey("Test GetCacheHitStates ", t, func() {
Convey("with data ", func() {
Expand Down
Loading