@@ -64,12 +64,12 @@ public void testGeneratePathForFixedType() {
64
64
String basePath = getPath (pathList ) + indexUUID + SEPARATOR + shardId + SEPARATOR ;
65
65
// Translog Data
66
66
BlobPath result = FIXED .path (blobPath , indexUUID , shardId , dataCategory , dataType );
67
- assertEquals (basePath + dataCategory + SEPARATOR + dataType + SEPARATOR , result .buildAsString ());
67
+ assertEquals (basePath + dataCategory . getName () + SEPARATOR + dataType . getName () + SEPARATOR , result .buildAsString ());
68
68
69
69
// Translog Metadata
70
70
dataType = METADATA ;
71
71
result = FIXED .path (blobPath , indexUUID , shardId , dataCategory , dataType );
72
- assertEquals (basePath + dataCategory + SEPARATOR + dataType + SEPARATOR , result .buildAsString ());
72
+ assertEquals (basePath + dataCategory . getName () + SEPARATOR + dataType . getName () + SEPARATOR , result .buildAsString ());
73
73
74
74
// Translog Lock files - This is a negative case where the assertion will trip.
75
75
BlobPath finalBlobPath = blobPath ;
@@ -79,17 +79,17 @@ public void testGeneratePathForFixedType() {
79
79
dataCategory = SEGMENTS ;
80
80
dataType = DATA ;
81
81
result = FIXED .path (blobPath , indexUUID , shardId , dataCategory , dataType );
82
- assertEquals (basePath + dataCategory + SEPARATOR + dataType + SEPARATOR , result .buildAsString ());
82
+ assertEquals (basePath + dataCategory . getName () + SEPARATOR + dataType . getName () + SEPARATOR , result .buildAsString ());
83
83
84
84
// Segment Metadata
85
85
dataType = METADATA ;
86
86
result = FIXED .path (blobPath , indexUUID , shardId , dataCategory , dataType );
87
- assertEquals (basePath + dataCategory + SEPARATOR + dataType + SEPARATOR , result .buildAsString ());
87
+ assertEquals (basePath + dataCategory . getName () + SEPARATOR + dataType . getName () + SEPARATOR , result .buildAsString ());
88
88
89
89
// Segment Metadata
90
90
dataType = LOCK_FILES ;
91
91
result = FIXED .path (blobPath , indexUUID , shardId , dataCategory , dataType );
92
- assertEquals (basePath + dataCategory + SEPARATOR + dataType + SEPARATOR , result .buildAsString ());
92
+ assertEquals (basePath + dataCategory . getName () + SEPARATOR + dataType . getName () + SEPARATOR , result .buildAsString ());
93
93
}
94
94
95
95
private List <String > getPathList () {
0 commit comments