Skip to content

Commit

Permalink
Jenkins job waits and holds the container for 100 hours in case failu…
Browse files Browse the repository at this point in the history
…re (#305)
  • Loading branch information
shosseinimotlagh authored Feb 7, 2024
1 parent 7ccd134 commit 78901af
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
7 changes: 6 additions & 1 deletion .jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,17 @@ pipeline {

stage("Compile") {
steps {
sh "conan create ${BUILD_MISSING} -pr debug -o ${PROJECT}:sanitize=True . ${PROJECT}/${TAG} ; \
sh "hostname ; \
echo $NODE_NAME ; \
conan create ${BUILD_MISSING} -pr debug -o ${PROJECT}:sanitize=True . ${PROJECT}/${TAG} ; \
conan create ${BUILD_MISSING} -pr debug . ${PROJECT}/${TAG} ; \
conan create ${BUILD_MISSING} -pr test -o sisl:malloc_impl=tcmalloc . ${PROJECT}/${TAG} ; \
conan create ${BUILD_MISSING} -pr test -o sisl:prerelease=True -o sisl:malloc_impl=tcmalloc . ${PROJECT}/${TAG} ; \
"
}
post {
failure { script { sleep 3600000 } }
}
}

stage("Deploy") {
Expand Down
18 changes: 11 additions & 7 deletions src/tests/test_scripts/btree_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
dirpath = "./"
op_list = ""
log_mods = ""
threads = " --num_threads=5"
fibers = " --num_fibers=5"
threads = " --num_threads=2"
fibers = " --num_fibers=2"
preload_size = " --preload_size=262144" # 256K
num_entries = " --num_entries=2097152" # 2M
num_iters = " --num_iters=100000000"
Expand Down Expand Up @@ -76,10 +76,10 @@
class TestFailedError(Exception):
pass

def long_runnig_index():
def long_runnig_index(type=0):
print("normal test started with (%s)" % (btree_options+ " " + run_time))
# " --operation_list=query:20 --operation_list=put:20 --operation_list=remove:20"
cmd_opts = "--gtest_filter=BtreeConcurrentTest/0.ConcurrentAllOps --gtest_break_on_failure " + btree_options + " "+log_mods + run_time
cmd_opts = "--gtest_filter=BtreeConcurrentTest/" + str(type) +".ConcurrentAllOps --gtest_break_on_failure " + btree_options + " "+log_mods + run_time
subprocess.check_call(dirpath + "test_index_btree " + cmd_opts, stderr=subprocess.STDOUT, shell=True)
print("Long running test completed")

Expand Down Expand Up @@ -137,8 +137,8 @@ def test_index_btree():
while True:
try:
#TODO enable for other types when fix is available for varlen node types.
#for type in range(4):
long_running_clean_shutdown(0)
for type in range(4):
long_running_clean_shutdown(type)
except:
print("Test failed: {}".format(e))
break
Expand All @@ -147,7 +147,11 @@ def test_index_btree():
time.sleep(60)

def nightly():
# long_runnig_index()
long_runnig_index(0)
long_runnig_index(1)
long_runnig_index(2)
long_runnig_index(3)

# long_running_clean_shutdown()
test_index_btree()
# crash_recovery_framework()
Expand Down

0 comments on commit 78901af

Please sign in to comment.