mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
This is a possible fix for #4653. Changes made: 1. Added tests for creating and updating consumers on a work queue stream with overlapping subjects. 2. Check for overlapping subjects before [updating](a25af02c73/server/consumer.go (L770)) the consumer config. 3. Changed [`func (*stream).partitionUnique(partitions []string) bool`](a25af02c73/server/stream.go (L5269)) to accept the consumer name being checked so we can skip it while checking for overlapping subjects (Required for [`FilterSubjects`](a25af02c73/server/consumer.go (L75)) updates), wasn't needed before because the checks were made on creation only. There's only 1 thing that I'm not sure about. In the [current work queue stream conflict checks](a25af02c73/server/consumer.go (L796)), the consumer config `Direct` is being checked if `false`, should we also make this check before the update? Signed-off-by: Pierre Mdawar <pierre@mdawar.dev>
Tests
Tests that run on Travis have been split into jobs that run in their own VM in parallel. This reduces the overall running time but also is allowing recycling of a job when we get a flapper as opposed to have to recycle the whole test suite.
JetStream Tests
For JetStream tests, we need to observe a naming convention so that no tests are omitted when running on Travis.
The script runTestsOnTravis.sh will run a given job based on the definition found in ".travis.yml".
As for the naming convention:
- All JetStream tests name should start with
TestJetStream - Cluster tests should go into
jetstream_cluster_test.goand start withTestJetStreamCluster - Super-cluster tests should go into
jetstream_super_cluster_test.goand start withTestJetStreamSuperCluster
Not following this convention means that some tests may not be executed on Travis.