Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix integration test. #697

Merged
merged 1 commit into from
Sep 7, 2023
Merged

Fix integration test. #697

merged 1 commit into from
Sep 7, 2023

Conversation

shibd
Copy link
Member

@shibd shibd commented Sep 7, 2023

Motivation

https://github.com/streamnative/pulsar-io-amqp-1-0/actions/runs/6104944284/job/16568284156

The current integration test aways failed.

Refer to the sink log. The root cause is the sink not running.

Here we set custom schema: org.apache.pulsar.client.impl.schema.ByteBufferSchema

But this class is not in the NAR of the connector.

java.lang.RuntimeException: User class must be in class path
	at org.apache.pulsar.common.util.Reflections.createInstance(Reflections.java:72) ~[org.apache.pulsar-pulsar-common-3.0.1.jar:3.0.1]
	at org.apache.pulsar.functions.instance.InstanceUtils.createInstance(InstanceUtils.java:92) ~[org.apache.pulsar-pulsar-functions-instance-3.0.1.jar:3.0.1]
	at org.apache.pulsar.functions.instance.InstanceUtils.initializeSerDe(InstanceUtils.java:51) ~[org.apache.pulsar-pulsar-functions-instance-3.0.1.jar:3.0.1]
	at org.apache.pulsar.functions.source.TopicSchema.newSchemaInstance(TopicSchema.java:247) ~[org.apache.pulsar-pulsar-functions-instance-3.0.1.jar:3.0.1]
	at org.apache.pulsar.functions.source.TopicSchema.newSchemaInstance(TopicSchema.java:261) ~[org.apache.pulsar-pulsar-functions-instance-3.0.1.jar:3.0.1]
	at org.apache.pulsar.functions.source.TopicSchema.lambda$getSchema$2(TopicSchema.java:81) ~[org.apache.pulsar-pulsar-functions-instance-3.0.1.jar:3.0.1]
	at java.util.HashMap.computeIfAbsent(HashMap.java:1220) ~[?:?]
	at org.apache.pulsar.functions.source.TopicSchema.getSchema(TopicSchema.java:81) ~[org.apache.pulsar-pulsar-functions-instance-3.0.1.jar:3.0.1]
	at org.apache.pulsar.functions.source.PulsarSource.buildPulsarSourceConsumerConfig(PulsarSource.java:178) ~[org.apache.pulsar-pulsar-functions-instance-3.0.1.jar:3.0.1]
	at org.apache.pulsar.functions.source.SingleConsumerPulsarSource.open(SingleConsumerPulsarSource.java:67) ~[org.apache.pulsar-pulsar-functions-instance-3.0.1.jar:3.0.1]
	at org.apache.pulsar.functions.instance.JavaInstanceRunnable.setupInput(JavaInstanceRunnable.java:856) ~[org.apache.pulsar-pulsar-functions-instance-3.0.1.jar:3.0.1]
	at org.apache.pulsar.functions.instance.JavaInstanceRunnable.setup(JavaInstanceRunnable.java:253) ~[org.apache.pulsar-pulsar-functions-instance-3.0.1.jar:3.0.1]
	at org.apache.pulsar.functions.instance.JavaInstanceRunnable.run(JavaInstanceRunnable.java:290) ~[org.apache.pulsar-pulsar-functions-instance-3.0.1.jar:3.0.1]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.ClassNotFoundException: org.apache.pulsar.client.impl.schema.ByteBufferSchema
	at java.net.URLClassLoader.findClass(URLClassLoader.java:445) ~[?:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:587) ~[?:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
	at java.lang.Class.forName0(Native Method) ~[?:?]
	at java.lang.Class.forName(Class.java:467) ~[?:?]
	at org.apache.pulsar.common.util.Reflections.createInstance(Reflections.java:70) ~[org.apache.pulsar-pulsar-common-3.0.1.jar:3.0.1]
	... 13 more

Modifications

  • Remove custom schema, It is not necessary.
  • Upgrade testcontainers version.
  • Close container resources when test ends.

Verifying this change

  • Test passed.

Documentation

Check the box below.

Need to update docs?

  • doc-required

    (If you need help on updating docs, create a doc issue)

  • no-need-doc

    (Please explain why)

  • doc

    (If this PR contains doc changes)

@shibd shibd requested a review from gaoran10 September 7, 2023 08:51
@shibd shibd self-assigned this Sep 7, 2023
@shibd shibd requested a review from a team as a code owner September 7, 2023 08:51
@github-actions github-actions bot added the no-need-doc This pr does not need any document label Sep 7, 2023
@shibd shibd merged commit 57e0b95 into streamnative:master Sep 7, 2023
4 checks passed
shibd added a commit that referenced this pull request Sep 7, 2023
(cherry picked from commit 57e0b95)
shibd added a commit that referenced this pull request Sep 7, 2023
(cherry picked from commit 57e0b95)
shibd added a commit that referenced this pull request Sep 7, 2023
(cherry picked from commit 57e0b95)
shibd added a commit that referenced this pull request Sep 7, 2023
(cherry picked from commit 57e0b95)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants