You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by dk...@apache.org on 2020/05/21 14:13:24 UTC

[avro] 01/02: AVRO-2554: Fix Ruby interop test to read all supported codecs

This is an automated email from the ASF dual-hosted git repository.

dkulp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git

commit ef85cd4099dc645bcd853ceb60e44ff93b4840f0
Author: Kengo Seki <se...@apache.org>
AuthorDate: Mon Sep 9 11:53:00 2019 +0900

    AVRO-2554: Fix Ruby interop test to read all supported codecs
---
 lang/ruby/interop/test_interop.rb | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lang/ruby/interop/test_interop.rb b/lang/ruby/interop/test_interop.rb
index a63c158..9af35bf 100755
--- a/lang/ruby/interop/test_interop.rb
+++ b/lang/ruby/interop/test_interop.rb
@@ -19,7 +19,7 @@ require 'rubygems'
 require 'test/unit'
 require 'avro'
 
-CODECS_TO_VALIDATE = ['deflate']  # The 'null' codec is implicitly included
+CODECS_TO_VALIDATE = ['deflate', 'zstandard']  # The 'null' codec is implicitly included
 
 class TestInterop < Test::Unit::TestCase
   HERE = File.expand_path(File.dirname(__FILE__))
@@ -27,12 +27,14 @@ class TestInterop < Test::Unit::TestCase
   SCHEMAS = SHARE + '/test/schemas'
 
   files = Dir[HERE + '/../../../build/interop/data/*.avro'].select do |fn|
-    sep, codec = File.basename(fn, 'avro').rpartition('_')[1, 2]
+    sep, codec = File.basename(fn, '.avro').rpartition('_')[1, 2]
     sep.empty? || CODECS_TO_VALIDATE.include?(codec)
   end
+  puts "The following files will be tested:"
+  puts files
 
   files.each do |fn|
-    define_method("test_read_#{File.basename(fn, 'avro')}") do
+    define_method("test_read_#{File.basename(fn, '.avro')}") do
       projection = Avro::Schema.parse(File.read(SCHEMAS+'/interop.avsc'))
 
       File.open(fn) do |f|