Skip to content

Commit

Permalink
Replication: this whole suite needs component replication
Browse files Browse the repository at this point in the history
  • Loading branch information
elliefm committed Sep 13, 2024
1 parent 4e91e61 commit 7b1894e
Show file tree
Hide file tree
Showing 46 changed files with 26 additions and 46 deletions.
5 changes: 4 additions & 1 deletion cassandane/Cassandane/Cyrus/Replication.pm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ use Cassandane::Config;
sub new
{
my $class = shift;
return $class->SUPER::new({ replica => 1, adminstore => 1 }, @_);
my $self = $class->SUPER::new({ replica => 1, adminstore => 1 }, @_);

$self->needs('component', 'replication');
return $self;
}

sub set_up
Expand Down
2 changes: 1 addition & 1 deletion cassandane/tiny-tests/Replication/alternate_globalannots
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use Cassandane::Tiny;

# trying to reproduce error reported in https://git.cyrus.foundation/T228
sub test_alternate_globalannots
:NoStartInstances :needs_component_replication
:NoStartInstances
{
my ($self) = @_;

Expand Down
1 change: 0 additions & 1 deletion cassandane/tiny-tests/Replication/append
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use Cassandane::Tiny;
# Test replication of messages APPENDed to the master
#
sub test_append
:needs_component_replication
{
my ($self) = @_;

Expand Down
1 change: 0 additions & 1 deletion cassandane/tiny-tests/Replication/appendmulti_diskfull
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use Cassandane::Tiny;
#
sub test_appendmulti_diskfull
:CSyncReplication :NoStartInstances :min_version_3_5
:needs_component_replication
{
my ($self) = @_;

Expand Down
2 changes: 1 addition & 1 deletion cassandane/tiny-tests/Replication/appendone_diskfull
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Cassandane::Tiny;
# Test handling of replication when append fails due to disk error
#
sub test_appendone_diskfull
:NoStartInstances :min_version_3_5 :needs_component_replication
:NoStartInstances :min_version_3_5
{
my ($self) = @_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use Cassandane::Tiny;

sub test_clean_remote_shutdown_while_rolling
:CSyncReplication :SyncLog :min_version_3_5
:needs_component_replication
{
my ($self) = @_;

Expand Down
1 change: 0 additions & 1 deletion cassandane/tiny-tests/Replication/connect_once
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use Cassandane::Tiny;

sub test_connect_once
:CSyncReplication :min_version_3_9
:needs_component_replication
{
my ($self) = @_;

Expand Down
1 change: 0 additions & 1 deletion cassandane/tiny-tests/Replication/delete_longname
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use Cassandane::Tiny;

sub test_delete_longname
:AllowMoves :Replication :SyncLog :DelayedDelete :min_version_3_3
:needs_component_replication
{
my ($self) = @_;

Expand Down
2 changes: 1 addition & 1 deletion cassandane/tiny-tests/Replication/full_rename
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Cassandane::Tiny;
# Test replication of mailbox only after a rename
#
sub test_full_rename
:NoAltNameSpace :needs_component_replication :AllowMoves :Replication :SyncLog :DelayedDelete
:NoAltNameSpace :AllowMoves :Replication :SyncLog :DelayedDelete
{
my ($self) = @_;

Expand Down
1 change: 0 additions & 1 deletion cassandane/tiny-tests/Replication/intermediate_rename
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use Cassandane::Tiny;

sub test_intermediate_rename
:AllowMoves :Replication :SyncLog :DelayedDelete :min_version_3_3
:needs_component_replication
{
my ($self) = @_;

Expand Down
1 change: 0 additions & 1 deletion cassandane/tiny-tests/Replication/intermediate_upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use Cassandane::Tiny;

sub test_intermediate_upgrade
:AllowMoves :Replication :SyncLog :DelayedDelete :min_version_3_3
:needs_component_replication
{
my ($self) = @_;

Expand Down
2 changes: 1 addition & 1 deletion cassandane/tiny-tests/Replication/mboxgroups
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use Cassandane::Tiny;

sub test_mboxgroups
:needs_component_replication :Mboxgroups :ReverseACLs
:Mboxgroups :ReverseACLs
{
my ($self) = @_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use Cassandane::Tiny;

# this test is too tricky to get working on uuid mailboxes
sub test_replication_mailbox_new_enough
:max_version_3_4 :needs_component_replication
:max_version_3_4
{
my ($self) = @_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use Cassandane::Tiny;

# this test is too tricky to get working on uuid mailboxes
sub test_replication_mailbox_too_old
:max_version_3_4 :needs_component_replication
:max_version_3_4
{
my ($self) = @_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
use Cassandane::Tiny;

sub test_replication_repair_zero_msgs
:needs_component_replication
{
my ($self) = @_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
use Cassandane::Tiny;

sub test_replication_with_modified_seen_flag
:needs_component_replication
{
my ($self) = @_;

Expand Down
2 changes: 1 addition & 1 deletion cassandane/tiny-tests/Replication/reset_on_master
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Cassandane::Tiny;
# wasn't correctly looking only for children of that name, so it would try
# to delete the wrong user's mailbox.
sub test_reset_on_master
:DelayedDelete :min_version_3_3 :needs_component_replication
:DelayedDelete :min_version_3_3
{
my ($self) = @_;
$self->{instance}->create_user("user2");
Expand Down
1 change: 0 additions & 1 deletion cassandane/tiny-tests/Replication/rolling_retry_wait_limit
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use Cassandane::Tiny;

sub test_rolling_retry_wait_limit
:CSyncReplication :NoStartInstances :min_version_3_5
:needs_component_replication
{
my ($self) = @_;
my $maxwait = 20;
Expand Down
2 changes: 1 addition & 1 deletion cassandane/tiny-tests/Replication/shared_folder
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Cassandane::Tiny;
# Test replication of messages APPENDed to the master
#
sub test_shared_folder
:Replication :SyncLog :needs_component_replication :NoAltNamespace
:Replication :SyncLog :NoAltNamespace
{
my ($self) = @_;

Expand Down
2 changes: 1 addition & 1 deletion cassandane/tiny-tests/Replication/sieve_replication
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use Cassandane::Tiny;

sub test_sieve_replication
:needs_component_sieve :needs_component_replication
:needs_component_sieve
{
my ($self) = @_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use Cassandane::Tiny;

sub test_sieve_replication_delete_unactivate
:needs_component_sieve :needs_component_replication
:needs_component_sieve
{
my ($self) = @_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use Cassandane::Tiny;

sub test_sieve_replication_delete_unactivate_unixhs
:needs_component_sieve :UnixHierarchySep
:needs_component_replication
{
my ($self) = @_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use Cassandane::Tiny;

sub test_sieve_replication_different
:needs_component_sieve :needs_component_replication
:needs_component_sieve
{
my ($self) = @_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use Cassandane::Tiny;

sub test_sieve_replication_different_unixhs
:needs_component_sieve :UnixHierarchySep
:needs_component_replication
{
my ($self) = @_;

Expand Down
2 changes: 1 addition & 1 deletion cassandane/tiny-tests/Replication/sieve_replication_exists
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use Cassandane::Tiny;

sub test_sieve_replication_exists
:needs_component_sieve :needs_component_replication
:needs_component_sieve
{
my ($self) = @_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use Cassandane::Tiny;

sub test_sieve_replication_exists_unixhs
:needs_component_sieve :UnixHierarchySep
:needs_component_replication
{
my ($self) = @_;

Expand Down
2 changes: 1 addition & 1 deletion cassandane/tiny-tests/Replication/sieve_replication_stale
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use Cassandane::Tiny;

sub test_sieve_replication_stale
:needs_component_sieve :needs_component_replication
:needs_component_sieve
{
my ($self) = @_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use Cassandane::Tiny;

sub test_sieve_replication_stale_unixhs
:needs_component_sieve :UnixHierarchySep
:needs_component_replication
{
my ($self) = @_;

Expand Down
1 change: 0 additions & 1 deletion cassandane/tiny-tests/Replication/sieve_replication_unixhs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use Cassandane::Tiny;

sub test_sieve_replication_unixhs
:needs_component_sieve :UnixHierarchySep
:needs_component_replication
{
my ($self) = @_;

Expand Down
1 change: 0 additions & 1 deletion cassandane/tiny-tests/Replication/splitbrain
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use Cassandane::Tiny;
# Test replication of messages APPENDed to the master
#
sub test_splitbrain
:needs_component_replication
{
my ($self) = @_;

Expand Down
1 change: 0 additions & 1 deletion cassandane/tiny-tests/Replication/splitbrain_bothexpunge
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use Cassandane::Tiny;
# Test replication of messages APPENDed to the master
#
sub test_splitbrain_bothexpunge
:needs_component_replication
{
my ($self) = @_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Cassandane::Tiny;
# Test non-empty mailbox causes replication to abort
#
sub test_splitbrain_different_uniqueid_nonempty
:min_version_3_5 :needs_component_replication :NoReplicaonly
:min_version_3_5 :NoReplicaonly
{
my ($self) = @_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Cassandane::Tiny;
# Test empty mailbox gets overwritten
#
sub test_splitbrain_different_uniqueid_unused
:min_version_3_5 :needs_component_replication :NoReplicaonly
:min_version_3_5 :NoReplicaonly
{
my ($self) = @_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Cassandane::Tiny;
# Test mailbox that's had email but is now empty again
#
sub test_splitbrain_different_uniqueid_used
:min_version_3_5 :needs_component_replication :NoReplicaonly
:min_version_3_5 :NoReplicaonly
{
my ($self) = @_;

Expand Down
1 change: 0 additions & 1 deletion cassandane/tiny-tests/Replication/splitbrain_mailbox
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use Cassandane::Tiny;
#
sub test_splitbrain_mailbox
:min_version_3_1 :max_version_3_4 :NoAltNameSpace
:needs_component_replication
{
my ($self) = @_;

Expand Down
1 change: 0 additions & 1 deletion cassandane/tiny-tests/Replication/splitbrain_masterexpunge
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use Cassandane::Tiny;
# Test replication of messages APPENDed to the master
#
sub test_splitbrain_masterexpunge
:needs_component_replication
{
my ($self) = @_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use Cassandane::Tiny;
# Test replication of messages APPENDed to the master
#
sub test_splitbrain_replicaexpunge
:needs_component_replication
{
my ($self) = @_;

Expand Down
1 change: 0 additions & 1 deletion cassandane/tiny-tests/Replication/subscriptions
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
use Cassandane::Tiny;

sub test_subscriptions
:needs_component_replication
{
my ($self) = @_;

Expand Down
2 changes: 1 addition & 1 deletion cassandane/tiny-tests/Replication/subscriptions_unixhs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use Cassandane::Tiny;

sub test_subscriptions_unixhs
:UnixHierarchySep :needs_component_replication
:UnixHierarchySep
{
my ($self) = @_;

Expand Down
2 changes: 1 addition & 1 deletion cassandane/tiny-tests/Replication/sync_empty_file
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use Cassandane::Tiny;

# this is testing a bug where sync_client would abort on zero-length file
sub test_sync_empty_file
:DelayedDelete :min_version_3_3 :needs_component_replication
:DelayedDelete :min_version_3_3
{
my ($self) = @_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use Cassandane::Tiny;

sub test_sync_log_mailbox_with_spaces
:DelayedDelete :NoStartInstances :needs_component_replication
:DelayedDelete :NoStartInstances
{
my ($self) = @_;

Expand Down
2 changes: 1 addition & 1 deletion cassandane/tiny-tests/Replication/syncall_failinguser
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Cassandane::Tiny;
# Test handling of replication when append fails due to disk error
#
sub test_syncall_failinguser
:NoStartInstances :min_version_3_6 :needs_component_replication
:NoStartInstances :min_version_3_6
{
my ($self) = @_;

Expand Down
1 change: 0 additions & 1 deletion cassandane/tiny-tests/Replication/toarchive
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use Cassandane::Tiny;

sub test_toarchive
:NoStartInstances :ArchivePartition :min_version_3_7
:needs_component_replication
{
my ($self) = @_;

Expand Down
2 changes: 1 addition & 1 deletion cassandane/tiny-tests/Replication/toarchive_noarchive
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use Cassandane::Tiny;

sub test_toarchive_noarchive
:NoStartInstances :min_version_3_7 :needs_component_replication
:NoStartInstances :min_version_3_7
{
my ($self) = @_;

Expand Down
1 change: 0 additions & 1 deletion cassandane/tiny-tests/Replication/userflags
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use Cassandane::Tiny;
# Test replication of user-defined flags
#
sub test_userflags
:needs_component_replication
{
my ($self) = @_;

Expand Down
2 changes: 1 addition & 1 deletion cassandane/tiny-tests/Replication/userprefix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Cassandane::Tiny;
# wasn't correctly looking only for children of that name, so it would try
# to delete the wrong user's mailbox.
sub test_userprefix
:DelayedDelete :needs_component_replication
:DelayedDelete
{
my ($self) = @_;
$self->{instance}->create_user("ua");
Expand Down

0 comments on commit 7b1894e

Please sign in to comment.