@@ -69,19 +69,19 @@ async fn test_get_storage_accessor_fs() -> Result<()> {
69
69
70
70
#[ test]
71
71
fn test_short_sql ( ) {
72
- // Test case 1: SQL query shorter than 10KB
72
+ // Test case 1: SQL query shorter than 30KB
73
73
let sql1 = "SELECT * FROM users WHERE id = 1;" . to_string ( ) ;
74
74
assert_eq ! ( short_sql( sql1. clone( ) ) , sql1) ;
75
75
76
- // Test case 2: SQL query longer than 10KB and starts with "INSERT"
76
+ // Test case 2: SQL query longer than 30KB and starts with "INSERT"
77
77
let long_sql = "INSERT INTO users (id, name, email) VALUES " . to_string ( )
78
- + & "(1, 'John Doe', 'john@example.com'), " . repeat ( 1000 ) ;
79
- let expected_result = long_sql. as_bytes ( ) [ ..10240 ] . to_vec ( ) ;
78
+ + & "(1, 'John Doe', 'john@example.com'), " . repeat ( 1500 ) ; // Adjusted for 30KB
79
+ let expected_result = long_sql. as_bytes ( ) [ ..30 * 1024 ] . to_vec ( ) ;
80
80
let expected_result = String :: from_utf8 ( expected_result) . unwrap ( ) + "..." ;
81
81
assert_eq ! ( short_sql( long_sql) , expected_result) ;
82
82
83
- // Test case 3: SQL query longer than 10KB but does not start with "INSERT"
84
- let long_sql = "SELECT * FROM users WHERE " . to_string ( ) + & "id = 1 OR " . repeat ( 1000 ) ;
83
+ // Test case 3: SQL query longer than 30KB but does not start with "INSERT"
84
+ let long_sql = "SELECT * FROM users WHERE " . to_string ( ) + & "id = 1 OR " . repeat ( 1500 ) ; // Adjusted for 30KB
85
85
assert_eq ! ( short_sql( long_sql. clone( ) ) , long_sql) ;
86
86
87
87
// Test case 4: Empty SQL query
0 commit comments