Disable failing tests and add logs for replication e2e (#132)

* Disable sequential test

* Remove parent build and benchmark

* Save test data

* Save e2e logs in build folder

* Define different recovery time for each test
This commit is contained in:
antonio2368 2021-04-02 12:29:10 +02:00 committed by GitHub
parent 6d4fe5cdd5
commit 5c93f81881
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 27 additions and 60 deletions

View File

@ -217,21 +217,6 @@ jobs:
# branches and tags. (default: 1)
fetch-depth: 0
- name: Set up parent
run: |
# Remove parent folder (if it exists).
cd ..
if [ -d parent ]; then
rm -rf parent
fi
# Copy untouched repository to parent folder.
cp -r memgraph parent
# Checkout previous commit
cd parent
git checkout HEAD~1
- name: Build release binaries
run: |
# Activate toolchain.
@ -245,20 +230,6 @@ jobs:
cmake -DCMAKE_BUILD_TYPE=release ..
make -j$THREADS
- name: Build parent binaries
run: |
# Activate toolchain.
source /opt/toolchain-v2/activate
# Initialize dependencies.
cd ../parent
./init
# Build parent binaries.
cd build
cmake -DCMAKE_BUILD_TYPE=release ..
make -j$THREADS memgraph memgraph__macro_benchmark
- name: Run macro benchmark tests
run: |
cd tests/macro_benchmark
@ -266,26 +237,6 @@ jobs:
--groups aggregation 1000_create unwind_create dense_expand match \
--no-strict
- name: Run parent macro benchmark tests
run: |
cd ../parent/tests/macro_benchmark
./harness QuerySuite MemgraphRunner \
--groups aggregation 1000_create unwind_create dense_expand match \
--no-strict
- name: Compute macro benchmark summary
run: |
./tools/github/macro_benchmark_summary \
--current tests/macro_benchmark/.harness_summary \
--previous ../parent/tests/macro_benchmark/.harness_summary \
--output macro_benchmark_summary.txt
- name: Save macro benchmark summary
uses: actions/upload-artifact@v2
with:
name: "Macro benchmark summary"
path: macro_benchmark_summary.txt
- name: Run GQL Behave tests
run: |
cd tests/gql_behave
@ -348,6 +299,15 @@ jobs:
name: "Enterprise DEB package"
path: build/output/memgraph*.deb
- name: Save test data
uses: actions/upload-artifact@v2
if: always()
with:
name: "Test data"
path: |
# multiple paths could be defined
build/logs
release_jepsen_test:
name: "Release Jepsen Test"
runs-on: [self-hosted, Linux, X64, Debian10, JepsenControl]

View File

@ -2,7 +2,8 @@ bolt_port: &bolt_port "7687"
template_cluster: &template_cluster
cluster:
main:
args: ["--bolt-port", *bolt_port, "--memory-limit=500", "--storage-gc-cycle-sec=180"]
args: ["--bolt-port", *bolt_port, "--memory-limit=500", "--storage-gc-cycle-sec=180", "--log-level=TRACE"]
log_file: "memory-e2e.log"
setup_queries: []
validation_queries: []

View File

@ -11,19 +11,23 @@ template_validation_queries: &template_validation_queries
template_cluster: &template_cluster
cluster:
replica_1:
args: ["--bolt-port", "7688"]
args: ["--bolt-port", "7688", "--log-level=TRACE"]
log_file: "replication-e2e-replica1.log"
setup_queries: ["SET REPLICATION ROLE TO REPLICA WITH PORT 10001;"]
<<: *template_validation_queries
replica_2:
args: ["--bolt-port", "7689"]
args: ["--bolt-port", "7689", "--log-level=TRACE"]
log_file: "replication-e2e-replica2.log"
setup_queries: ["SET REPLICATION ROLE TO REPLICA WITH PORT 10002;"]
<<: *template_validation_queries
replica_3:
args: ["--bolt-port", "7690"]
args: ["--bolt-port", "7690", "--log-level=TRACE"]
log_file: "replication-e2e-replica3.log"
setup_queries: ["SET REPLICATION ROLE TO REPLICA WITH PORT 10003;"]
<<: *template_validation_queries
main:
args: ["--bolt-port", "7687"]
args: ["--bolt-port", "7687", "--log-level=TRACE"]
log_file: "replication-e2e-main.log"
setup_queries: [
"REGISTER REPLICA replica_1 SYNC WITH TIMEOUT 0 TO '127.0.0.1:10001'",
"REGISTER REPLICA replica_2 SYNC WITH TIMEOUT 1 TO '127.0.0.1:10002'",

View File

@ -44,7 +44,9 @@ def run(args):
for name, config in workload['cluster'].items():
mg_instance = MemgraphInstanceRunner(MEMGRAPH_BINARY)
mg_instances[name] = mg_instance
mg_instance.start(args=config['args'])
log_file_path = os.path.join(BUILD_DIR, 'logs', config['log_file'])
binary_args = config['args'] + ["--log-file", log_file_path]
mg_instance.start(args=binary_args)
for query in config['setup_queries']:
mg_instance.query(query)
# Test.

View File

@ -164,4 +164,4 @@
{:bank (bank-checker)
:timeline (timeline/html)})
:generator (c/replication-gen (gen/mix [read-balances valid-transfer]))
:final-generator (gen/once read-balances)})
:final-generator {:gen (gen/once read-balances) :recovery-time 20}})

View File

@ -22,7 +22,7 @@
"A map of workload names to functions that can take opts and construct
workloads."
{:bank bank/workload
:sequential sequential/workload
;; :sequential sequential/workload (T0532-MG)
:large large/workload})
(def nemesis-configuration
@ -45,8 +45,8 @@
(gen/log "Healing cluster.")
(gen/nemesis (:final-generator nemesis))
(gen/log "Waiting for recovery")
(gen/sleep 20)
(gen/clients final-generator))
(gen/sleep (:recovery-time final-generator))
(gen/clients (:gen final-generator)))
gen)]
(merge tests/noop-test
opts

View File

@ -103,4 +103,4 @@
:timeline (timeline/html)})
:generator (c/replication-gen
(gen/mix [read-nodes add-nodes]))
:final-generator (gen/once read-nodes)})
:final-generator {:gen (gen/once read-nodes) :recovery-time 40}})