@@ -945,25 +945,13 @@ describeCompat("IdCompressor Summaries", "NoCompat", (getTestObjectProvider, com
945
945
) ;
946
946
} ) ;
947
947
948
- /**
949
- * Function that asserts that the value is not as expected. e have a bug in one of our customer's app where a short
950
- * data store ID created is `[` but in a downloaded snapshot, it is converted to its ASCII equivalent `%5B` in
951
- * certain conditions. So, when an op comes for this data store with id `[`, containers loaded with this snapshot
952
- * cannot find the data store.
953
- *
954
- * While we figure out the fix, we are disabling the ability to create short IDs and this assert validates it.
955
- */
956
- function assertInvert ( value : boolean , message : string ) {
957
- assert ( ! value , message ) ;
958
- }
959
-
960
948
async function TestCompactIds ( enableRuntimeIdCompressor : IdCompressorMode ) {
961
949
const container = await createContainer ( {
962
950
runtimeOptions : { enableRuntimeIdCompressor } ,
963
951
} ) ;
964
952
const defaultDataStore = ( await container . getEntryPoint ( ) ) as ITestDataObject ;
965
953
// This data store was created in detached container, so it has to be short!
966
- assertInvert (
954
+ assert (
967
955
defaultDataStore . _runtime . id . length <= 2 ,
968
956
"short data store ID created in detached container" ,
969
957
) ;
@@ -1002,14 +990,14 @@ describeCompat("IdCompressor Summaries", "NoCompat", (getTestObjectProvider, com
1002
990
// Check directly that ID compressor is issuing short IDs!
1003
991
// If it does not, the rest of the tests would fail - this helps isolate where the bug is.
1004
992
const idTest = defaultDataStore . _context . containerRuntime . generateDocumentUniqueId ( ) ;
1005
- assertInvert ( typeof idTest === "number" && idTest >= 0 , "short IDs should be issued" ) ;
993
+ assert ( typeof idTest === "number" && idTest >= 0 , "short IDs should be issued" ) ;
1006
994
1007
995
// create another datastore
1008
996
const ds2 = await defaultDataStore . _context . containerRuntime . createDataStore ( pkg ) ;
1009
997
const entryPoint2 = ( await ds2 . entryPoint . get ( ) ) as ITestDataObject ;
1010
998
1011
999
// This data store was created in attached container, and should have used ID compressor to assign ID!
1012
- assertInvert (
1000
+ assert (
1013
1001
entryPoint2 . _runtime . id . length <= 2 ,
1014
1002
"short data store ID created in attached container" ,
1015
1003
) ;
@@ -1028,7 +1016,7 @@ describeCompat("IdCompressor Summaries", "NoCompat", (getTestObjectProvider, com
1028
1016
undefined ,
1029
1017
SharedDirectory . getFactory ( ) . type ,
1030
1018
) ;
1031
- assertInvert ( channel . id . length <= 2 , "DDS ID created in detached data store" ) ;
1019
+ assert ( channel . id . length <= 2 , "DDS ID created in detached data store" ) ;
1032
1020
1033
1021
// attached data store.
1034
1022
await ds2 . trySetAlias ( "foo" ) ;
@@ -1043,7 +1031,7 @@ describeCompat("IdCompressor Summaries", "NoCompat", (getTestObjectProvider, com
1043
1031
undefined ,
1044
1032
SharedDirectory . getFactory ( ) . type ,
1045
1033
) ;
1046
- assertInvert ( channel2 . id . length <= 2 , "DDS ID created in attached data store" ) ;
1034
+ assert ( channel2 . id . length <= 2 , "DDS ID created in attached data store" ) ;
1047
1035
}
1048
1036
1049
1037
it ( "Container uses short DataStore & DDS IDs in delayed mode" , async ( ) => {
@@ -1062,19 +1050,17 @@ describeCompat("IdCompressor Summaries", "NoCompat", (getTestObjectProvider, com
1062
1050
} ;
1063
1051
const container = await loader . createDetachedContainer ( defaultCodeDetails ) ;
1064
1052
const defaultDataStore = ( await container . getEntryPoint ( ) ) as ITestFluidObject ;
1065
- assertInvert (
1053
+ assert (
1066
1054
defaultDataStore . context . id . length <= 2 ,
1067
- "Default data store's ID should be short" ,
1055
+ "Default data store's ID should be short. " ,
1068
1056
) ;
1069
1057
const dataStore1 =
1070
1058
await defaultDataStore . context . containerRuntime . createDataStore ( TestDataObjectType ) ;
1071
1059
const ds1 = ( await dataStore1 . entryPoint . get ( ) ) as ITestFluidObject ;
1072
- assertInvert (
1060
+ assert (
1073
1061
ds1 . context . id . length <= 2 ,
1074
1062
"Data store's ID in detached container should not be short" ,
1075
1063
) ;
1076
- const dds1 = SharedDirectory . create ( ds1 . runtime ) ;
1077
- assertInvert ( dds1 . id . length <= 2 , "DDS's ID in detached container should not be short" ) ;
1078
1064
1079
1065
await container . attach ( provider . driver . createCreateNewRequest ( ) ) ;
1080
1066
@@ -1085,15 +1071,14 @@ describeCompat("IdCompressor Summaries", "NoCompat", (getTestObjectProvider, com
1085
1071
ds2 . context . id . length > 8 ,
1086
1072
"Data store's ID in attached container should not be short" ,
1087
1073
) ;
1088
- const dds2 = SharedDirectory . create ( ds2 . runtime ) ;
1089
- assert ( dds2 . id . length > 8 , "DDS's ID in attached container should not be short" ) ;
1090
1074
} ) ;
1091
1075
} ) ;
1092
1076
1093
1077
/**
1094
- * These tests repro a bug where ODSP driver does not correctly decode encoded snapshot tree paths.
1095
- * Data store / DDS created with special characters are encoded during summary upload but during
1096
- * download, they are not correctly decoded in certain scenarios.
1078
+ * These tests try to reproduce a bug where ODSP driver did not correctly decode encoded snapshot tree paths.
1079
+ * Data store / DDS created with special characters were encoded during summary upload but during
1080
+ * download, they were not correctly decoded in certain scenarios.
1081
+ * The bug has been resolved, but these tests are kept to ensure that the bug does not regress.
1097
1082
*/
1098
1083
describeCompat (
1099
1084
"Short IDs in detached container" ,
@@ -1119,7 +1104,6 @@ describeCompat(
1119
1104
if ( provider . driver . type !== "odsp" ) {
1120
1105
this . skip ( ) ;
1121
1106
}
1122
- configProvider . set ( "Fluid.Runtime.IsShortIdEnabled" , true ) ;
1123
1107
} ) ;
1124
1108
1125
1109
/**
0 commit comments