1313import static org .junit .jupiter .api .Assertions .assertThrows ;
1414import static org .junit .jupiter .api .Assertions .assertTrue ;
1515import static org .junit .jupiter .api .Assertions .fail ;
16- import static org .junit .jupiter .api .Assumptions .assumeFalse ;
1716import static org .junit .jupiter .api .Assumptions .assumeTrue ;
1817
1918import glide .api .BaseClient ;
@@ -275,13 +274,6 @@ private BaseClient createListener(
275274 // meanwhile, all pubsubMessages are delivered.
276275 // debug this and add checks for `publish` return value
277276
278- // TODO: remove once fixed
279- private void skipTestsOnMac () {
280- assumeFalse (
281- System .getProperty ("os.name" ).toLowerCase ().contains ("mac" ),
282- "PubSub doesn't work on mac OS" );
283- }
284-
285277 @ SneakyThrows
286278 @ ParameterizedTest (name = "standalone = {0}" )
287279 @ ValueSource (booleans = {true , false })
@@ -312,7 +304,6 @@ public void config_error_on_resp2(boolean standalone) {
312304 @ ParameterizedTest (name = "standalone = {0}, read messages via {1}" )
313305 @ MethodSource ("getTestScenarios" )
314306 public void exact_happy_path (boolean standalone , MessageReadMethod method ) {
315- skipTestsOnMac ();
316307 GlideString channel = gs (UUID .randomUUID ().toString ());
317308 GlideString message = gs (UUID .randomUUID ().toString ());
318309 var subscriptions = Map .of (exact (standalone ), Set .of (channel ));
@@ -333,7 +324,6 @@ public void exact_happy_path(boolean standalone, MessageReadMethod method) {
333324 @ ParameterizedTest (name = "standalone = {0}, read messages via {1}" )
334325 @ MethodSource ("getTestScenarios" )
335326 public void exact_happy_path_many_channels (boolean standalone , MessageReadMethod method ) {
336- skipTestsOnMac ();
337327 int numChannels = 16 ;
338328 int messagesPerChannel = 16 ;
339329 var messages = new ArrayList <PubSubMessage >(numChannels * messagesPerChannel );
@@ -369,7 +359,6 @@ public void exact_happy_path_many_channels(boolean standalone, MessageReadMethod
369359 @ EnumSource (MessageReadMethod .class )
370360 public void sharded_pubsub (MessageReadMethod method ) {
371361 assumeTrue (SERVER_VERSION .isGreaterThanOrEqualTo ("7.0.0" ), "This feature added in version 7" );
372- skipTestsOnMac ();
373362
374363 GlideString channel = gs (UUID .randomUUID ().toString ());
375364 GlideString pubsubMessage = gs (UUID .randomUUID ().toString ());
@@ -391,7 +380,6 @@ public void sharded_pubsub(MessageReadMethod method) {
391380 @ EnumSource (MessageReadMethod .class )
392381 public void sharded_pubsub_many_channels (MessageReadMethod method ) {
393382 assumeTrue (SERVER_VERSION .isGreaterThanOrEqualTo ("7.0.0" ), "This feature added in version 7" );
394- skipTestsOnMac ();
395383
396384 int numChannels = 16 ;
397385 int pubsubMessagesPerChannel = 16 ;
@@ -429,7 +417,6 @@ public void sharded_pubsub_many_channels(MessageReadMethod method) {
429417 @ ParameterizedTest (name = "standalone = {0}, read messages via {1}" )
430418 @ MethodSource ("getTestScenarios" )
431419 public void pattern (boolean standalone , MessageReadMethod method ) {
432- skipTestsOnMac ();
433420 String prefix = "channel." ;
434421 GlideString pattern = gs (prefix + "*" );
435422 Map <GlideString , GlideString > message2channels =
@@ -468,7 +455,6 @@ public void pattern(boolean standalone, MessageReadMethod method) {
468455 @ ParameterizedTest (name = "standalone = {0}, read messages via {1}" )
469456 @ MethodSource ("getTestScenarios" )
470457 public void pattern_many_channels (boolean standalone , MessageReadMethod method ) {
471- skipTestsOnMac ();
472458 String prefix = "channel." ;
473459 GlideString pattern = gs (prefix + "*" );
474460 int numChannels = 16 ;
@@ -506,7 +492,6 @@ public void pattern_many_channels(boolean standalone, MessageReadMethod method)
506492 @ ParameterizedTest (name = "standalone = {0}, read messages via {1}" )
507493 @ MethodSource ("getTestScenarios" )
508494 public void combined_exact_and_pattern_one_client (boolean standalone , MessageReadMethod method ) {
509- skipTestsOnMac ();
510495 String prefix = "channel." ;
511496 GlideString pattern = gs (prefix + "*" );
512497 int numChannels = 16 ;
@@ -557,7 +542,6 @@ public void combined_exact_and_pattern_one_client(boolean standalone, MessageRea
557542 @ MethodSource ("getTestScenarios" )
558543 public void combined_exact_and_pattern_multiple_clients (
559544 boolean standalone , MessageReadMethod method ) {
560- skipTestsOnMac ();
561545 String prefix = "channel." ;
562546 GlideString pattern = gs (prefix + "*" );
563547 int numChannels = 16 ;
@@ -626,7 +610,6 @@ public void combined_exact_and_pattern_multiple_clients(
626610 @ EnumSource (MessageReadMethod .class )
627611 public void combined_exact_pattern_and_sharded_one_client (MessageReadMethod method ) {
628612 assumeTrue (SERVER_VERSION .isGreaterThanOrEqualTo ("7.0.0" ), "This feature added in version 7" );
629- skipTestsOnMac ();
630613
631614 String prefix = "channel." ;
632615 GlideString pattern = gs (prefix + "*" );
@@ -682,7 +665,6 @@ public void combined_exact_pattern_and_sharded_one_client(MessageReadMethod meth
682665 @ Test
683666 public void coexistense_of_sync_and_async_read () {
684667 assumeTrue (SERVER_VERSION .isGreaterThanOrEqualTo ("7.0.0" ), "This feature added in version 7" );
685- skipTestsOnMac ();
686668
687669 String prefix = "channel." ;
688670 String pattern = prefix + "*" ;
@@ -764,7 +746,6 @@ public void coexistense_of_sync_and_async_read() {
764746 @ EnumSource (MessageReadMethod .class )
765747 public void combined_exact_pattern_and_sharded_multi_client (MessageReadMethod method ) {
766748 assumeTrue (SERVER_VERSION .isGreaterThanOrEqualTo ("7.0.0" ), "This feature added in version 7" );
767- skipTestsOnMac ();
768749
769750 String prefix = "channel." ;
770751 GlideString pattern = gs (prefix + "*" );
@@ -880,7 +861,6 @@ public void combined_exact_pattern_and_sharded_multi_client(MessageReadMethod me
880861 @ EnumSource (MessageReadMethod .class )
881862 public void three_publishing_clients_same_name_with_sharded (MessageReadMethod method ) {
882863 assumeTrue (SERVER_VERSION .isGreaterThanOrEqualTo ("7.0.0" ), "This feature added in version 7" );
883- skipTestsOnMac ();
884864
885865 GlideString channel = gs (UUID .randomUUID ().toString ());
886866 var exactMessage = new PubSubMessage (gs (UUID .randomUUID ().toString ()), channel );
@@ -959,7 +939,6 @@ public void three_publishing_clients_same_name_with_sharded(MessageReadMethod me
959939 @ SneakyThrows
960940 @ Test
961941 public void error_cases () {
962- skipTestsOnMac ();
963942 // client isn't configured with subscriptions
964943 var client = createClient (true );
965944 assertThrows (ConfigurationError .class , client ::tryGetPubSubMessage );
@@ -991,7 +970,6 @@ public void error_cases() {
991970 @ MethodSource ("getTestScenarios" )
992971 public void transaction_with_all_types_of_messages (boolean standalone , MessageReadMethod method ) {
993972 assumeTrue (SERVER_VERSION .isGreaterThanOrEqualTo ("7.0.0" ), "This feature added in version 7" );
994- skipTestsOnMac ();
995973 assumeTrue (
996974 standalone , // TODO activate tests after fix
997975 "Test doesn't work on cluster due to Cross Slot error, probably a bug in `redis-rs`" );
0 commit comments