File tree Expand file tree Collapse file tree 2 files changed +39
-2
lines changed
Expand file tree Collapse file tree 2 files changed +39
-2
lines changed Original file line number Diff line number Diff line change @@ -193,7 +193,28 @@ jobs:
193193 done
194194 echo "PostgreSQL is ready."
195195
196- RAILS_ENV=test bundle exec rails db:prepare
196+ echo "Testing simple app loading first..."
197+ RAILS_ENV=test bundle exec rails runner "puts 'App loads OK'" 2>&1 || {
198+ echo "App loading fails"
199+ exit 1
200+ }
201+
202+ echo "Running db:create..."
203+ RAILS_ENV=test bundle exec rails db:create 2>&1 || echo "db:create failed or DB already exists"
204+
205+ echo "Running db:schema:load..."
206+ RAILS_ENV=test bundle exec rails db:schema:load 2>&1 || {
207+ echo "db:schema:load failed"
208+ exit 1
209+ }
210+
211+ echo "Running db:seed..."
212+ RAILS_ENV=test bundle exec rails db:seed 2>&1 || {
213+ echo "db:seed failed"
214+ exit 1
215+ }
216+
217+ echo "All db operations completed successfully"
197218
198219 SUBJECT_LIST_OUTPUT=$(RAILS_ENV=test DEBUG_TRANSFORMATIONS=true bundle exec mutant environment subject list)
199220 mapfile -t subjects_array < <( \
Original file line number Diff line number Diff line change @@ -2,8 +2,10 @@ module Infra
22 class EventStore < SimpleDelegator
33 def self . main
44 if ENV [ 'DISABLE_EVENT_TRANSFORMATIONS' ] == 'true'
5+ puts "[DEBUG] Event transformations DISABLED"
56 mapper = default_mapper
67 else
8+ puts "[DEBUG] Event transformations ENABLED"
79 require_relative "../../../rails_application/lib/transformations/refund_to_return_event_mapper" rescue nil
810
911 if defined? ( Transformations ::RefundToReturnEventMapper )
@@ -24,7 +26,21 @@ def self.main
2426 end
2527 end
2628
27- new ( RailsEventStore ::JSONClient . new ( mapper : mapper ) )
29+ client = RailsEventStore ::JSONClient . new ( mapper : mapper )
30+
31+ def client . publish ( *events , **kwargs )
32+ events . each do |event |
33+ if event . respond_to? ( :timestamp ) && event . timestamp . nil?
34+ puts "[ERROR] Event #{ event . class . name } has nil timestamp!"
35+ puts "[ERROR] Event ID: #{ event . event_id } "
36+ puts "[ERROR] Stack trace:"
37+ puts caller [ 0 ..10 ] . join ( "\n " )
38+ end
39+ end
40+ super ( *events , **kwargs )
41+ end
42+
43+ new ( client )
2844 end
2945
3046 def self . in_memory
You can’t perform that action at this time.
0 commit comments