[ 
https://issues.apache.org/jira/browse/BEAM-14191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17513708#comment-17513708
 ] 

Pablo Estrada commented on BEAM-14191:
--------------------------------------

I've verified this on a previous commit. The tests for Mysql were correct, so 
this does break the MySQL test now.

 

Here's what I did:

 
{code:java}
# Needed: ./gradlew :sdks:java:container:java8:docker
# Needed also: ./gradlew 
:sdks:java:extensions:schemaio-expansion-service:shadowJar
python -m pytest  -o log_cli=True -o log_level=Info 
apache_beam/io/external/xlang_jdbcio_it_test.py::CrossLanguageJdbcIOTest::test_xlang_jdbc_write_1_mysql
 --test-pipeline-options='--runner=TestDirectRunner' {code}
 

I modified the test by adding an extra element with this diff:

 
{code:java}
diff --git a/sdks/python/apache_beam/io/external/xlang_jdbcio_it_test.py 
b/sdks/python/apache_beam/io/external/xlang_jdbcio_it_test.py
index 77856046d8..d87aacf43d 100644
--- a/sdks/python/apache_beam/io/external/xlang_jdbcio_it_test.py
+++ b/sdks/python/apache_beam/io/external/xlang_jdbcio_it_test.py
@@ -157,7 +157,7 @@ class CrossLanguageJdbcIOTest(unittest.TestCase):
 
     self.assertEqual(
         set(fetched_rows),
-        set(inserted_rows),
+        set(inserted_rows).union(set([JdbcWriteTestRow(11, 11 + 0.1, 
'Test11')])),
         'Inserted data does not fit data fetched from table',
     )
  {code}
 

And I was able to make the test pass/fail without/with the diff.

> CrossLanguageJdbcIOTest broken with "Cannot load JDBC driver class 
> 'com.mysql.cj.jdbc.Driver'"
> ----------------------------------------------------------------------------------------------
>
>                 Key: BEAM-14191
>                 URL: https://issues.apache.org/jira/browse/BEAM-14191
>             Project: Beam
>          Issue Type: Bug
>          Components: cross-language, test-failures
>            Reporter: Luke Cwik
>            Assignee: Pablo Estrada
>            Priority: P1
>             Fix For: 2.38.0
>
>
> Example failure: 
> https://ci-beam.apache.org/job/beam_PostCommit_Python36/5113/testReport/junit/apache_beam.io.external.xlang_jdbcio_it_test/CrossLanguageJdbcIOTest/test_xlang_jdbc_read_1_mysql/
> Culprit: https://github.com/apache/beam/pull/17167
> {noformat}
> RuntimeError: Pipeline 
> BeamApp-jenkins-0325181709-516ba346_d7972792-2c60-4332-8107-ac73c585491a 
> failed in state FAILED: java.lang.RuntimeException: Error received from SDK 
> harness for instruction 19: org.apache.beam.sdk.util.UserCodeException: 
> java.sql.SQLException: Cannot load JDBC driver class 
> 'com.mysql.cj.jdbc.Driver'
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to