@@ -1138,16 +1138,14 @@ def testNesting(env):
1138
1138
res = r .execute_command ('JSON.GET' , 'test' , '$..__leaf' )
1139
1139
r .assertEqual (res , '[42]' )
1140
1140
1141
- # No overall max nesting level (can exceeded the single value max nesting level)
1141
+ # Max nesting level of nested objects cannot exceed 128
1142
1142
doc = nest_object (depth , 5 , "__deep_leaf" , 420 )
1143
1143
r .execute_command ('JSON.SET' , 'test' , '$..__leaf' , doc )
1144
1144
res = r .execute_command ('JSON.GET' , 'test' , '$..__deep_leaf' )
1145
1145
r .assertEqual (res , '[420]' )
1146
1146
1147
1147
doc = nest_object (depth , 5 , "__helms_deep_leaf" , 42000 )
1148
- r .execute_command ('JSON.SET' , 'test' , '$..__deep_leaf' , doc )
1149
- res = r .execute_command ('JSON.GET' , 'test' , '$..__helms_deep_leaf' )
1150
- r .assertEqual (res , '[42000]' )
1148
+ r .expect ('JSON.SET' , 'test' , '$..__deep_leaf' , doc ).raiseError ().contains ("recursion limit exceeded" )
1151
1149
1152
1150
# Max nesting level for a single JSON value cannot be exceeded
1153
1151
depth = 129
0 commit comments