prestodb / tempto

A testing framework for Presto
Apache License 2.0
61 stars 23 forks source link

Duplicate tests generated from sql file #159

Open mattsfuller opened 8 years ago

mattsfuller commented 8 years ago
11:57:38 [ERROR] Caused by: java.nio.file.FileAlreadyExistsException: /tmp/product_tests2822818868707960416/testcases/math_functions/checkMathOperatorsAccessible.result
11:57:38 [ERROR] at java.nio.file.CopyMoveHelper.copyToForeignTarget(CopyMoveHelper.java:119)
11:57:38 [ERROR] at java.nio.file.Files.copy(Files.java:1277)
11:57:38 [ERROR] at com.teradata.tempto.internal.convention.SqlTestsFileUtils.lambda$copyFileRecursive$18(SqlTestsFileUtils.java:78)

I added an extra directory to the classpath, but that directory contains only generated tests with names like stmt0.sql, stmt1.sql, etc.

mattsfuller commented 8 years ago

Lukasz added some debug logging to tempto. Here is an updated error log:

10:20:33 2015-07-24 17:20:34 DEBUG [] c.t.t.i.c.ConventionBasedTestFactory - Loading file based test cases  
10:20:33 2015-07-24 17:20:34 DEBUG [] c.t.t.i.c.ConventionTestsUtils - discovered following convention tests uris: [file:/build/target/test-classes/sql-tests/testcases, file:/build/generated/sql-tests/testcases, jar:file:/root/.m2/repository/com/facebook/presto/presto-product-tests/0.101-SNAPSHOT/presto-product-tests-0.101-SNAPSHOT-tests.jar!/sql-tests/testcases]  
10:20:33 2015-07-24 17:20:34 DEBUG [] c.t.t.i.c.ConventionTestsUtils - copying convention tests from file:/build/target/test-classes/sql-tests/testcases to /tmp/product_tests6556201627788110201/testcases  
10:20:33 2015-07-24 17:20:34 DEBUG [] c.t.t.i.c.ConventionTestsUtils - copying convention tests from file:/build/generated/sql-tests/testcases to /tmp/product_tests6556201627788110201/testcases  
10:20:33 2015-07-24 17:20:34 DEBUG [] c.t.t.i.c.ConventionTestsUtils - copying convention tests from jar:file:/root/.m2/repository/com/facebook/presto/presto-product-tests/0.101-SNAPSHOT/presto-product-tests-0.101-SNAPSHOT-tests.jar!/sql-tests/testcases to /tmp/product_tests6556201627788110201/testcases  
10:20:33 2015-07-24 17:20:34 ERROR [] c.t.t.i.c.ConventionBasedTestFactory - Could not create file test java.lang.RuntimeException: java.nio.file.FileAlreadyExistsException: /tmp/product_tests6556201627788110201/testcases/math_functions/checkMathOperatorsAccessible.result