Skip to content

Add missing test coverage for Dalli::Server#30

Merged
mattwd7 merged 1 commit intobraze-mainfrom
NOTIX-add-tests-test_server
Feb 19, 2026
Merged

Add missing test coverage for Dalli::Server#30
mattwd7 merged 1 commit intobraze-mainfrom
NOTIX-add-tests-test_server

Conversation

@mattwd7
Copy link

@mattwd7 mattwd7 commented Feb 19, 2026

Summary

Substantially expands test coverage for Dalli::Server:

  • Initialization: default options, custom option merging, initial state
  • Name/hostname parsing: TCP (host, host:port, host:port:weight), UNIX sockets, IPv4, IPv6, FQDN, invalid inputs
  • Serializer/compressor accessors: defaults and custom overrides
  • close: no-op when nil, socket teardown and state reset
  • alive?: sock-present, down_retry_delay period, reconnect after delay
  • multi_response_completed? / multi_response_abort: buffer state management
  • Request error handling: Timeout::Error closes socket, MarshalError returns false
  • serialize: Marshal flags, raw mode, compression thresholds (min/max/per-request), combined flags, MarshalError wrapping
  • deserialize: raw, compressed, combined flags, UnmarshalError for bad data, custom serializer error handling
  • verify_state: inprogress check, fork detection
  • failure! / down! / up!: failure counting, server down lifecycle
  • multi?: thread-local state
  • split: 64-bit integer splitting
  • need_auth? / username / password: option and env variable resolution
  • TTL translation: under/over 30-day threshold, timestamp passthrough
  • guard_max_value: under-max yield, over-max warning, error mode

Made with Cursor

Cover initialization defaults, hostname parsing (TCP, UNIX,
IPv4, IPv6, FQDN), serialize/deserialize with compression
flags, close, alive?, verify_state, failure!/down!/up!,
multi state, split, TTL translation, guard_max_value, and
auth credential resolution.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Author

@mattwd7 mattwd7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 👍

@mattwd7 mattwd7 marked this pull request as ready for review February 19, 2026 20:57
@mattwd7 mattwd7 requested a review from a team as a code owner February 19, 2026 20:57
@mattwd7 mattwd7 merged commit 660c7d4 into braze-main Feb 19, 2026
2 checks passed
@mattwd7 mattwd7 deleted the NOTIX-add-tests-test_server branch February 19, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants