Skip to content

Commit afa1975

Browse files
committed
WIP
1 parent 5efb311 commit afa1975

File tree

2 files changed

+57
-17
lines changed

2 files changed

+57
-17
lines changed

.github/workflows/test-plugin-make.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ jobs:
146146
- name: RUN TESTS
147147
if: inputs.plugin != 'rabbitmq_peer_discovery_aws'
148148
run: |
149-
make -C deps/${{ inputs.plugin }} parallel-ct RABBITMQ_METADATA_STORE=${{ matrix.metadata_store }}
149+
make -C deps/${{ inputs.plugin }} parallel-ct-set-1 RABBITMQ_METADATA_STORE=${{ matrix.metadata_store }}
150150
# echo "Tests in shard:"
151151
# cat ${{ steps.shard.outputs.file }}
152152
# echo ""
@@ -161,10 +161,11 @@ jobs:
161161
# --test_env RABBITMQ_METADATA_STORE=${{ matrix.metadata_store }} \
162162
# --build_tests_only \
163163
# --verbose_failures
164-
# - name: UPLOAD TEST LOGS
165-
# if: always()
166-
# uses: actions/upload-artifact@v4
167-
# with:
168-
# name: bazel-testlogs-${{ inputs.plugin }}-${{ inputs.shard_index }}-${{ matrix.erlang_version }}-${{ matrix.metadata_store }}
169-
# path: |
170-
# bazel-testlogs/deps/${{ inputs.plugin }}/*
164+
- name: UPLOAD TEST LOGS
165+
if: always()
166+
uses: actions/upload-artifact@v4
167+
with:
168+
name: Common Test logs (${{ inputs.plugin }}-1-${{ matrix.erlang_version }}-${{ matrix.metadata_store }})
169+
path: |
170+
logs/
171+
!logs/**/log_private

deps/rabbit/Makefile

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ define ct_master.erl
235235
peer:call(Pid2, persistent_term, put, [rabbit_ct_tcp_port_base, 25000]),
236236
peer:call(Pid3, persistent_term, put, [rabbit_ct_tcp_port_base, 27000]),
237237
peer:call(Pid4, persistent_term, put, [rabbit_ct_tcp_port_base, 29000]),
238-
ct_master:run("ct.test.spec"),
238+
ct_master:run("$1"),
239239
peer:stop(Pid4),
240240
peer:stop(Pid3),
241241
peer:stop(Pid2),
@@ -257,13 +257,53 @@ endef
257257
#PARALLEL_CT_NUM_NODES ?= 4
258258
#PARALLEL_CT_NODE_NAME = rabbit_shard$1@localhost
259259
#PARALLEL_CT_NODE_INIT_FUN = fun(Pid, Num) -> peer:call(Pid, net_kernel, set_net_ticktime, [5]), peer:call(Pid, persistent_term, put, [rabbit_ct_tcp_port_base, 21000 + 2000 * Num]) end
260-
#
260+
261261
#PARALLEL_CT_NUM_SETS = 8
262-
#
263-
#PARALLEL_CT_SET_1 = amqp_address amqp_auth amqp_client amqp_credit_api_v2 amqp_proxy_protocol \
264-
# amqp_system amqpl_consumer_ack amqpl_direct_reply_to amqqueue_backward_compatibility \
265-
# backing_queue bindings channel_interceptor channel_operation_timeout classic_queue classic_queue_prop
266-
#
262+
263+
PARALLEL_CT_SET_1_A = amqp_client # 170s
264+
PARALLEL_CT_SET_1_B = amqp_address amqp_auth amqp_credit_api_v2 amqp_system # 150s
265+
PARALLEL_CT_SET_1_C = amqp_proxy_protocol amqpl_consumer_ack amqpl_direct_reply_to backing_queue bindings # 151s
266+
PARALLEL_CT_SET_1_D = amqqueue_backward_compatibility channel_interceptor channel_operation_timeout classic_queue classic_queue_prop # 143s
267+
268+
PARALLEL_CT_SET_1 = $(sort $(PARALLEL_CT_SET_1_A) $(PARALLEL_CT_SET_1_B) $(PARALLEL_CT_SET_1_C) $(PARALLEL_CT_SET_1_D))
269+
270+
define tpl_parallel_ct_test_spec
271+
{logdir, "logs/"}.
272+
{logdir, master, "logs/"}.
273+
{create_priv_dir, all_nodes, auto_per_run}.
274+
275+
{node, shard1, 'rabbit_shard1@localhost'}.
276+
{node, shard2, 'rabbit_shard2@localhost'}.
277+
{node, shard3, 'rabbit_shard3@localhost'}.
278+
{node, shard4, 'rabbit_shard4@localhost'}.
279+
280+
{define, 'Set1', [$(call comma_list,$(addsuffix _SUITE,$1))]}.
281+
{define, 'Set2', [$(call comma_list,$(addsuffix _SUITE,$2))]}.
282+
{define, 'Set3', [$(call comma_list,$(addsuffix _SUITE,$3))]}.
283+
{define, 'Set4', [$(call comma_list,$(addsuffix _SUITE,$4))]}.
284+
285+
{suites, shard1, "test/", 'Set1'}.
286+
{suites, shard2, "test/", 'Set2'}.
287+
{suites, shard3, "test/", 'Set3'}.
288+
{suites, shard4, "test/", 'Set4'}.
289+
endef
290+
291+
tpl_parallel_ct_test_spec_set_1 = $(call tpl_parallel_ct_test_spec,$(PARALLEL_CT_SET_1_A),$(PARALLEL_CT_SET_1_B),$(PARALLEL_CT_SET_1_C),$(PARALLEL_CT_SET_1_D))
292+
293+
parallel-ct-set-1: test-build
294+
$(verbose) mkdir -p $(CT_LOGS_DIR)
295+
$(verbose) $(call core_render,tpl_parallel_ct_test_spec_set_1,ct.set-1.spec)
296+
$(call erlang,$(call ct_master.erl,ct.set-1.spec),-sname parallel_ct_$(PROJECT)@localhost -hidden -kernel net_ticktime 5)
297+
298+
299+
300+
301+
302+
303+
304+
305+
306+
267307
#PARALLEL_CT_SET_2 = cluster config_schema confirms_rejects consumer_timeout crashing_queues \
268308
# deprecated_features direct_exchange_routing_v2 disconnect_detected_during_alarm \
269309
# disk_monitor dynamic_qq exchanges rabbit_stream_queue
@@ -364,10 +404,9 @@ endef
364404
#, upgrade_preparation
365405
#, vhost
366406

367-
368407
parallel-ct: test-build
369408
$(verbose) mkdir -p $(CT_LOGS_DIR)
370-
$(call erlang,$(ct_master.erl),-sname parallel_ct_$(PROJECT)@localhost -hidden -kernel net_ticktime 5)
409+
$(call erlang,$(call ct_master.erl,ct.test.spec),-sname parallel_ct_$(PROJECT)@localhost -hidden -kernel net_ticktime 5)
371410

372411
# --------------------------------------------------------------------
373412
# Compilation.

0 commit comments

Comments
 (0)