forked from YottaDB/YDBTest
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[YottaDB#341] New r124/ydb341 subtest (tests YottaDB/YDB#341)
- Loading branch information
Showing
5 changed files
with
95 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
; ; | ||
; Copyright (c) 2018 YottaDB LLC. and/or its subsidiaries. ; | ||
; All rights reserved. ; | ||
; ; | ||
; This source code contains the intellectual property ; | ||
; of its copyright holder(s), and is made available ; | ||
; under a license. If you do not know the terms of ; | ||
; the license, please stop and do not read further. ; | ||
; ; | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
; | ||
set jrisave=$$FUNC^%HD($$^%PEEKBYNAME("sgmnt_addrs.gvstats_rec.n_jrec_epoch_idle","DEFAULT")) | ||
write "Perform update SET ^x=1",! | ||
set ^x=1 | ||
write "Sleep for 8 seconds to ensure an idle epoch gets written",! | ||
; "hang 8" below takes into account 1 second for flush timer + 5 seconds for idle epoch timer + 2 seconds for buffer | ||
hang 8 | ||
write "Confirm an idle epoch did get written : " | ||
set jridelta=$$FUNC^%HD($$^%PEEKBYNAME("sgmnt_addrs.gvstats_rec.n_jrec_epoch_idle","DEFAULT"))-jrisave | ||
write "JRI gvstat increased by ",(jridelta>0),! | ||
write "Perform update SET ^x=2",! | ||
set ^x=2 | ||
set jresave=$$FUNC^%HD($$^%PEEKBYNAME("sgmnt_addrs.gvstats_rec.n_jrec_epoch_regular","DEFAULT")) | ||
write "Sleep for anywhere from 1 to 5 seconds",! | ||
hang 1+$random(5) | ||
write "Perform update SET ^x=3",! | ||
set ^x=3 | ||
write "Sleep for 1 second",! | ||
hang 1 | ||
write "Perform update SET ^x=4",! | ||
set ^x=4 | ||
write "Confirm a regular epoch got written in between updates ^x=2 and ^x=4 : " | ||
set jredelta=$$FUNC^%HD($$^%PEEKBYNAME("sgmnt_addrs.gvstats_rec.n_jrec_epoch_regular","DEFAULT"))-jresave | ||
write "JRE gvstat increased by ",(jredelta>0),! | ||
quit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# ---------------------------------------------------------------------------- | ||
# Test that epoch_interval setting is honored even if an idle epoch is written | ||
# ---------------------------------------------------------------------------- | ||
# Enable journaling on the database | ||
# Set epoch_interval of 2 seconds | ||
# Create database | ||
# Invoke : mumps -run ydb341 | ||
Perform update SET ^x=1 | ||
Sleep for 8 seconds to ensure an idle epoch gets written | ||
Confirm an idle epoch did get written : JRI gvstat increased by 1 | ||
Perform update SET ^x=2 | ||
Sleep for anywhere from 1 to 5 seconds | ||
Perform update SET ^x=3 | ||
Sleep for 1 second | ||
Perform update SET ^x=4 | ||
Confirm a regular epoch got written in between updates ^x=2 and ^x=4 : JRE gvstat increased by 1 | ||
# Do dbcheck on database |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/local/bin/tcsh -f | ||
################################################################# | ||
# # | ||
# Copyright (c) 2018 YottaDB LLC. and/or its subsidiaries. # | ||
# All rights reserved. # | ||
# # | ||
# This source code contains the intellectual property # | ||
# of its copyright holder(s), and is made available # | ||
# under a license. If you do not know the terms of # | ||
# the license, please stop and do not read further. # | ||
# # | ||
################################################################# | ||
# | ||
echo "# ----------------------------------------------------------------------------" | ||
echo "# Test that epoch_interval setting is honored even if an idle epoch is written" | ||
echo "# ----------------------------------------------------------------------------" | ||
# | ||
echo "# Enable journaling on the database" | ||
setenv gtm_test_jnl SETJNL | ||
echo "# Set epoch_interval of 2 seconds" | ||
setenv tst_jnl_str "$tst_jnl_str,epoch=2" | ||
echo "# Create database" | ||
$gtm_tst/com/dbcreate.csh mumps >& dbcreate.out | ||
if ($status) then | ||
echo "# dbcreate failed. Output of dbcreate.out follows" | ||
cat dbcreate.out | ||
exit -1 | ||
endif | ||
|
||
echo "# Invoke : mumps -run ydb341" | ||
$ydb_dist/mumps -run ydb341 | ||
|
||
echo "# Do dbcheck on database" | ||
$gtm_tst/com/dbcheck.csh >& dbcheck.out | ||
if ($status) then | ||
echo "# dbcheck failed. Output of dbcheck.out follows" | ||
cat dbcheck.out | ||
exit -1 | ||
endif |