Skip to content

Commit 5f572b3

Browse files
committed
Make minor correction
1 parent 249bcee commit 5f572b3

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

client/fed_test.go

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,29 +1030,17 @@ func TestPrestage(t *testing.T) {
10301030
age, size, err := tc.CacheInfo(fed.Ctx, innerFileUrl)
10311031
require.NoError(t, err)
10321032
assert.Equal(t, int64(len(testFileContent)), size)
1033-
// Temporarily commenting out this assertion because a GET request
1034-
// (with a byte range of 0-0) is used to retrieve object metadata
1035-
// instead of a HEAD request. This results in the first byte being
1036-
// fetched, causing the age to be 0 instead of -1.
1037-
// Currently, the HEAD request does not return the Content-Age header.
1038-
1039-
// assert.Equal(t, -1, age)
1040-
1041-
// Temporarily asserting age as 0 to avoid unused variable error.
1033+
// Due to an xrootd limitation, CacheInfo performs a GET request instead of a HEAD request.
1034+
// Once this limitation is resolved and CacheInfo is updated accordingly,
1035+
// the assertion should be changed to -1 instead of 0.
10421036
assert.Equal(t, 0, age)
10431037

10441038
age, size, err = tc.CacheInfo(fed.Ctx, innerFileUrl)
10451039
require.NoError(t, err)
10461040
assert.Equal(t, int64(len(testFileContent)), size)
1047-
// Temporarily commenting out this assertion because a GET request
1048-
// (with a byte range of 0-0) is used to retrieve object metadata
1049-
// instead of a HEAD request. This results in the first byte being
1050-
// fetched, causing the age to be 0 instead of -1.
1051-
// Currently, the HEAD request does not return the Content-Age header.
1052-
1053-
// assert.Equal(t, -1, age)
1054-
1055-
// Temporarily asserting age as 0 to avoid unused variable error.
1041+
// Due to an xrootd limitation, CacheInfo performs a GET request instead of a HEAD request.
1042+
// Once this limitation is resolved and CacheInfo is updated accordingly,
1043+
// the assertion should be changed to -1 instead of 0.
10561044
assert.Equal(t, 0, age)
10571045

10581046
// Prestage the object

0 commit comments

Comments
 (0)