File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,6 @@ def create_table_and_mapping
5656 @query_client . execute ( @database , ".create table #{ @table } ingestion json mapping '#{ @mapping_name } ' '#{ File . read ( "dataset_mapping.json" ) } '" )
5757 end
5858
59-
6059 def run_logstash
6160 File . write ( "logstash.conf" , @logstash_config )
6261
@@ -73,7 +72,7 @@ def run_logstash
7372 end
7473
7574 def assert_data
76- max_timeout = 10
75+ max_timeout = 10
7776 csv_data = CSV . read ( @csv_file )
7877
7978 ( 0 ..max_timeout ) . each do |_ |
@@ -82,16 +81,17 @@ def assert_data
8281 query = @query_client . execute ( @database , @table )
8382 result = query . getPrimaryResults ( )
8483 raise "Wrong count - expected #{ csv_data . length } , got #{ result . count ( ) } " unless result . count ( ) == csv_data . length
85- ( 0 ..csv_data . length ) . each do |i |
86- result . next ( )
87- ( 0 ..@column_count ) . each do |j |
88- raise "Wrong data - expected #{ csv_data [ i ] [ j ] } , got #{ result . getString ( j ) } " unless csv_data [ i ] [ j ] == result . getString ( j )
89- end
90- end
91- return
9284 rescue Exception => e
9385 puts "Error: #{ e } "
9486 end
87+ ( 0 ..csv_data . length ) . each do |i |
88+ result . next ( )
89+ ( 0 ..@column_count ) . each do |j |
90+ raise "Wrong data in row #{ i } , col #{ j } - expected #{ csv_data [ i ] [ j ] } , got #{ result . getString ( j ) } " unless csv_data [ i ] [ j ] == result . getString ( j )
91+ end
92+ end
93+ return
94+
9595 end
9696 raise "Failed after timeouts"
9797
You can’t perform that action at this time.
0 commit comments