Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 9, 2025

Test expectations in groups_spec.rb used inconsistent timestamp conversion formats, mixing (@time_now.to_f * 1000).to_i (millisecond-preserving) with @time_now.to_i * 1000 (millisecond-truncating).

Changes

  • Standardized all 9 inconsistent test expectations to use (@time_now.to_f * 1000).to_i
  • Affected tests: properly cast dates, convert offset datetimes to UTC, convert offset ActiveSupport::TimeWithZone, set_once, remove, union, unset (both variants), and delete_group
# Before (loses millisecond precision)
'$time' => @time_now.to_i * 1000

# After (preserves millisecond precision, consistent with line 26)
'$time' => (@time_now.to_f * 1000).to_i

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Changed 9 occurrences from `@time_now.to_i * 1000` to `(@time_now.to_f * 1000).to_i`
to ensure consistent millisecond precision across all test expectations.

Co-authored-by: hans-lizihan <7879022+hans-lizihan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 9, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • http://index.rubygems.org:80/api/v1/dependencies
    • Triggering command: /home/REDACTED/.local/share/gem/ruby/3.2.0/bin/bundle bundle install (http block)
  • http://index.rubygems.org:80/versions
    • Triggering command: /home/REDACTED/.local/share/gem/ruby/3.2.0/bin/bundle bundle install (http block)
  • http://rubygems.org:80/specs.4.8.gz
    • Triggering command: /home/REDACTED/.local/share/gem/ruby/3.2.0/bin/bundle bundle install (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] WIP address feedback from PR #127 Fix inconsistent timestamp format in groups_spec.rb test expectations Dec 9, 2025
Copilot AI requested a review from hans-lizihan December 9, 2025 21:03
@hans-lizihan hans-lizihan marked this pull request as ready for review December 9, 2025 21:04
@hans-lizihan hans-lizihan merged commit da8a51e into hans-fix-gha Dec 9, 2025
18 checks passed
hans-lizihan added a commit that referenced this pull request Dec 9, 2025
* Fixed gha

* Fixed tests and millisecond bugs

* Fixed tests and millisecond bugs

* Updated

* Updated matrix

* support up to 3.3

* Support 3.4

* Remove 2.2

* Update mixpanel-ruby.gemspec

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update lib/mixpanel-ruby/groups.rb

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix inconsistent timestamp format in groups_spec.rb test expectations (#128)

* Initial plan

* Fix inconsistent timestamp format in groups_spec.rb tests

Changed 9 occurrences from `@time_now.to_i * 1000` to `(@time_now.to_f * 1000).to_i`
to ensure consistent millisecond precision across all test expectations.

Co-authored-by: hans-lizihan <7879022+hans-lizihan@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: hans-lizihan <7879022+hans-lizihan@users.noreply.github.com>

* Fixed

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: hans-lizihan <7879022+hans-lizihan@users.noreply.github.com>
@hans-lizihan hans-lizihan deleted the copilot/sub-pr-127 branch December 12, 2025 19:22
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