spec/spec_helper.rb in rhoconnect-3.2.0.beta1 vs spec/spec_helper.rb in rhoconnect-3.2.0.beta2

- old
+ new

@@ -182,12 +182,12 @@ end true end def validate_db_by_name(db,s,data) - db.execute("select source_id,name,sync_priority,partition, - sync_type,source_attribs,metadata,schema,blob_attribs,associations + db.execute("select source_id,name,sync_priority,partition,sync_type,source_attribs, + metadata,schema,blob_attribs,associations,last_inserted_size, backend_refresh_time from sources where name='#{s.name}'").each do |row| return false if row[0].to_s != s.source_id.to_s return false if row[1] != s.name return false if row[2].to_s != s.priority.to_s @@ -196,10 +196,12 @@ return false if row[5] != (s.schema ? "" : get_attrib_counter(data)) return false if row[6] != s.get_value(:metadata) return false if row[7] != s.schema return false if row[8] != s.blob_attribs return false if row[9] != s.has_many + return false if row[10] != s.get_value(:md_size).to_i + return false if row[11] != s.read_state.refresh_time end data = json_clone(data) if s.schema schema = JSON.parse(s.schema) @@ -291,8 +293,16 @@ end end def get_sha1(str) Digest::SHA1.hexdigest(str) - end + end + + def do_bulk_data_job(params) + begin + BulkDataJob.perform(params) + ensure + BulkDataJob.after_perform_x(params) + end + end end #TestHelpers