Skip to content

v1.2.0 - Refactor & Test Coverage

Latest

Choose a tag to compare

@BitByLogics BitByLogics released this 26 Mar 23:54
· 1 commit to master since this release

Changelog

Refactor

  • Replace CopyOnWriteArrayList with ConcurrentHashMap in RedisManager for client storage
  • registerClient now returns @NotNull and uses case-insensitive key matching to prevent duplicate IDs
  • Remove CompletableFuture usage in RedisClient and simplify topic handling
  • Move TimedRequestSerializer from net.bitbylogic.rps.gson to net.bitbylogic.rps
  • Reduce TimedRequestSerializer access level to package-private
  • Change null channel fallback to empty string in TimedRequestSerializer
  • Introduce static shared GSON instance in ListenerComponent with enableComplexMapKeySerialization()
  • Remove pretty printing from RedisManager GSON instance
  • Change ListenerComponent(targetServerId, channel) constructor from private to public
  • Change setAllowSelfActivation() from private to protected in RedisMessageListener
  • Add @Contract annotations to fluent methods in ListenerComponent
  • Add @CheckReturnValue to getData, getDataOrElse, and getRequestByID in ListenerComponent
  • Add @CheckReturnValue to RedisManager#registerClient

Style

  • Fix Javadoc paragraph formatting in RedisClient

Tests

  • Add RedisManagerTest using JUnit 5 and TestContainers
  • Add test coverage for duplicate client registration, message send/receive, self-activation, multiple listeners, server ID filtering, timed request timeout/success, and malformed JSON handling
  • Add maven-surefire-plugin, junit-jupiter, and testcontainers-redis dependencies