grntest 1.6.4 → 1.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/text/news.md +6 -0
- data/lib/grntest/test-runner.rb +62 -27
- data/lib/grntest/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8698dc27823fe6b4865c631af65ba6f8cb5393c17c3dffe688d562aa1217941e
|
4
|
+
data.tar.gz: 3ef417fad36461099a6c2b2715aca265e7e8d7a5b71e9e418a5de701f3a5652a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd789d02b42adc35269d73590ac50922220dc33740ffa4f36ab9efefec02cfad7f40152e19fb2ca305d8a37b594b94cc4dfdfb72b9e8363fb363e45bf5214ed6
|
7
|
+
data.tar.gz: 35cf29b8cc1ea65ff15ee25fccde7155aab203522e89e8e89955101e3428c7c5bdb036ee1dc8e2a27699eaa7b0dd3642dc33fd8fdcf43be74d5672e429363772
|
data/doc/text/news.md
CHANGED
data/lib/grntest/test-runner.rb
CHANGED
@@ -664,6 +664,10 @@ http {
|
|
664
664
|
"header" => normalize_header(response["header"]),
|
665
665
|
"body" => normalize_body(response["body"]),
|
666
666
|
})
|
667
|
+
if normalized_response.key?("trace_log")
|
668
|
+
normalized_response["trace_log"] =
|
669
|
+
normalize_trace_log(normalized_response["trace_log"])
|
670
|
+
end
|
667
671
|
else
|
668
672
|
header, *values = response
|
669
673
|
normalized_header = normalize_header(header)
|
@@ -704,40 +708,57 @@ http {
|
|
704
708
|
normalized << schema.to_s
|
705
709
|
end
|
706
710
|
normalized << "\n"
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
when "error_message"
|
715
|
-
value = normalize_error_message(value) if value
|
716
|
-
when "error_file"
|
717
|
-
value = normalize_error_file_path(value) if value
|
718
|
-
when "error_line"
|
719
|
-
value = 0 if value
|
720
|
-
when "error_function"
|
721
|
-
value = normalize_error_function(value) if value
|
722
|
-
end
|
723
|
-
normalized_record << value
|
724
|
-
end
|
725
|
-
normalized_record
|
726
|
-
end
|
727
|
-
noramlized_table = Arrow::Table.new(schema, normalized_records)
|
728
|
-
normalized << noramlized_table.to_s
|
711
|
+
case (schema.metadata || {})["GROONGA:data_type"]
|
712
|
+
when "metadata"
|
713
|
+
normalized_table = normalize_apache_arrow_content_metadata(table)
|
714
|
+
normalized << normalized_table.to_s
|
715
|
+
when "trace_log"
|
716
|
+
normalized_table = normalize_apache_arrow_content_trace_log(table)
|
717
|
+
normalized << normalized_table.to_s
|
729
718
|
else
|
730
719
|
normalized << table.to_s
|
731
720
|
end
|
732
721
|
end
|
733
722
|
end
|
734
|
-
normalized
|
723
|
+
normalize_raw_content(normalized)
|
724
|
+
end
|
725
|
+
|
726
|
+
def normalize_apache_arrow_content_metadata(table)
|
727
|
+
normalized_records = table.each_record.collect do |record|
|
728
|
+
normalized_record = []
|
729
|
+
record.to_h.each do |name, value|
|
730
|
+
case name
|
731
|
+
when "start_time", "elapsed_time"
|
732
|
+
value = 0
|
733
|
+
when "error_message"
|
734
|
+
value = normalize_error_message(value) if value
|
735
|
+
when "error_file"
|
736
|
+
value = normalize_error_file_path(value) if value
|
737
|
+
when "error_line"
|
738
|
+
value = 0 if value
|
739
|
+
when "error_function"
|
740
|
+
value = normalize_error_function(value) if value
|
741
|
+
end
|
742
|
+
normalized_record << value
|
743
|
+
end
|
744
|
+
normalized_record
|
745
|
+
end
|
746
|
+
Arrow::Table.new(table.schema, normalized_records)
|
735
747
|
end
|
736
748
|
|
737
|
-
def
|
738
|
-
|
739
|
-
|
740
|
-
|
749
|
+
def normalize_apache_arrow_content_trace_log(table)
|
750
|
+
normalized_columns = table.columns.collect do |column|
|
751
|
+
case column.name
|
752
|
+
when "elapsed_time"
|
753
|
+
normalized_elapsed_times =
|
754
|
+
column.data_type.build_array(column.n_rows.times.to_a)
|
755
|
+
Arrow::Column.new(Arrow::Table.new(elapsed_time: normalized_elapsed_times),
|
756
|
+
0)
|
757
|
+
else
|
758
|
+
column
|
759
|
+
end
|
760
|
+
end
|
761
|
+
Arrow::Table.new(table.schema, normalized_columns)
|
741
762
|
end
|
742
763
|
|
743
764
|
def normalize_output_xml(content, options)
|
@@ -833,6 +854,20 @@ http {
|
|
833
854
|
end
|
834
855
|
end
|
835
856
|
|
857
|
+
def normalize_trace_log(trace_log)
|
858
|
+
if trace_log["logs"]
|
859
|
+
elapsed_time_index = trace_log["columns"].index do |column|
|
860
|
+
column["name"] == "elapsed_time"
|
861
|
+
end
|
862
|
+
normalized_elapsed_time = 0
|
863
|
+
trace_log["logs"].each do |log|
|
864
|
+
log[elapsed_time_index] = normalized_elapsed_time
|
865
|
+
normalized_elapsed_time += 1
|
866
|
+
end
|
867
|
+
end
|
868
|
+
trace_log
|
869
|
+
end
|
870
|
+
|
836
871
|
def normalize_error(content)
|
837
872
|
content = normalize_error_message(content)
|
838
873
|
normalize_raw_content(content)
|
data/lib/grntest/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grntest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-10-
|
12
|
+
date: 2023-10-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: diff-lcs
|