ruby on rails - Rspec with elasticsearch (searchkick) fails on CI server (Codeship) -


i'm having problems getting specs run cleanly on our ci server (codeship).

the specs run fine locally seems on ci server elasticsearch having issues keeping in sync.

i've researched issue , have found potential solutions, none of them work.

first solution had, creating helper method test suite whenever needed reindex.

def refresh_elasticsearch(model)   model.reindex   model.searchkick_index.refresh end 

without having local specs fail because documents not being found. once started calling helper method, started working.

i have 2 controllers have elasticsearch functionality, , 1 of them runs ok on codeship, strange. these controllers similar 1 i'm confused why 1 controller spec passes time , other 1 doesn't.

no exceptions thrown, basic expectations fail because i'm expecting document , finds none.

i've tried these solutions well: https://github.com/ankane/searchkick/pull/95

all these solutions work locally btw. fail same reason on ci server.

i'm running out of things try @ point. ideas??

any appreciated. thanks!!


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -