mirror of
https://github.com/status-im/sqlcipher.git
synced 2026-08-31 06:21:07 +00:00
remove randomization from rekey-delete tests to avoid unpredictable test failures
This commit is contained in:
+12
-14
@@ -208,17 +208,16 @@ do_test rekey-delete-and-query-1 {
|
||||
}
|
||||
|
||||
for {set i 1} {$i<1000} {incr i} {
|
||||
set r [expr {int(rand()*32767)}]
|
||||
set r1 [expr {int(rand()*32767)}]
|
||||
execsql "INSERT INTO t1 VALUES($r,$r1);"
|
||||
execsql "INSERT INTO t1 VALUES($i,$r1);"
|
||||
}
|
||||
set r [expr {int(rand()*32767)}]
|
||||
|
||||
execsql "DELETE FROM t1 WHERE a < 500;"
|
||||
|
||||
set r1 [expr {int(rand()*32767)}]
|
||||
execsql "UPDATE t1 SET b = $r WHERE a < $r1;"
|
||||
execsql "UPDATE t1 SET b = $r1 WHERE a < 750;"
|
||||
|
||||
set r [expr {int(rand()*32767)}]
|
||||
|
||||
execsql "DELETE FROM t1 WHERE a < $r;"
|
||||
execsql "DELETE FROM t1 WHERE a > 750;"
|
||||
|
||||
execsql {
|
||||
COMMIT;
|
||||
@@ -262,17 +261,16 @@ do_test rekey-delete-and-query-wal-1 {
|
||||
}
|
||||
|
||||
for {set i 1} {$i<1000} {incr i} {
|
||||
set r [expr {int(rand()*32767)}]
|
||||
set r1 [expr {int(rand()*32767)}]
|
||||
execsql "INSERT INTO t1 VALUES($r,$r1);"
|
||||
execsql "INSERT INTO t1 VALUES($i,$r1);"
|
||||
}
|
||||
set r [expr {int(rand()*32767)}]
|
||||
|
||||
execsql "DELETE FROM t1 WHERE a < 500;"
|
||||
|
||||
set r1 [expr {int(rand()*32767)}]
|
||||
execsql "UPDATE t1 SET b = $r WHERE a < $r1;"
|
||||
execsql "UPDATE t1 SET b = $r1 WHERE a < 750;"
|
||||
|
||||
set r [expr {int(rand()*32767)}]
|
||||
|
||||
execsql "DELETE FROM t1 WHERE a < $r;"
|
||||
execsql "DELETE FROM t1 WHERE a > 750;"
|
||||
|
||||
execsql {
|
||||
COMMIT;
|
||||
|
||||
Reference in New Issue
Block a user