Skip to content

Commit 2e87273

Browse files
authored
Add Notation to TestGetCacheHitStates in pkg/ddc/alluxio/cache_test.go. (#4593)
Signed-off-by: Yiian Chen <115157724+Aoitok@users.noreply.github.com>
1 parent ad54842 commit 2e87273

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

pkg/ddc/alluxio/cache_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff 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.
162173
func TestGetCacheHitStates(t *testing.T) {
163174
Convey("Test GetCacheHitStates ", t, func() {
164175
Convey("with data ", func() {

0 commit comments

Comments
 (0)