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

DBZ-6998: Align min, max of Histogram/Statistics #91

Merged
merged 6 commits into from
Oct 21, 2024

Conversation

dongwook-chan
Copy link
Contributor

Motivation:
Users experienced inconvenience because the statistics-related class was implemented separately. So that we abstracted common methods.

Modification:

  • Fix(Statistics): Add set method

Result:
User experience will be improved by common methods.

Motivation:
Users experienced inconvenience because the statistics-related class was implemented separately.
So that we abstracted common methods.

Modification:
- Fix(Statistics): Add set method

Result:
User experience will be improved by common methods.

Co-authored-by: Bue-von-hon <dkssudvn2@gmail.com>
Co-authored-by: chungeun-choi <cucuridas@gmail.com>
Copy link

github-actions bot commented Jul 6, 2024

Welcome as a new contributor to Debezium, @dongwook-chan. Reviewers, please add missing author name(s) and alias name(s) to the COPYRIGHT.txt and Aliases.txt respectively.

@Bue-von-hon
Copy link
Contributor

Bue-von-hon commented Jul 22, 2024

@jpechane @Naros The COPYRIGHT.txt and Aliases.txt files are missing please check.

@jpechane
Copy link
Collaborator

@Bue-von-hon No worries. The files in question are located in the main repository.

dongwook-chan and others added 2 commits August 17, 2024 14:34
Co-authored-by: sean-k1 <uhs2000@naver.com>
Co-authored-by: jongwony <lastone9182@gmail.com>
@dongwook-chan dongwook-chan marked this pull request as ready for review August 17, 2024 06:33
@dongwook-chan
Copy link
Contributor Author

@jpechane
PTAL

Co-authored-by: cjho0316 <cjho03160316@gmail.com>
@jpechane
Copy link
Collaborator

@nancyxu123 Hi, can you please take a look? What freedom do we have in playing with metrics?

@jpechane jpechane requested a review from nancyxu123 August 26, 2024 10:04
@sean-k1
Copy link
Contributor

sean-k1 commented Sep 28, 2024

@nancyxu123 PTAL

@nancyxu123
Copy link
Contributor

Thanks for the PR! Will take a look this week, thanks!

@nancyxu123
Copy link
Contributor

nancyxu123 commented Oct 4, 2024

Thanks for the PR! Will take a look this week, thanks!

Overall LGTM.

(1) What motivated the need for this PR?

(2) Can we add metrics validation into one of the integration tests? For example, any file that ends with IT.java: https://github.com/debezium/debezium-connector-spanner/blob/main/src/test/java/io/debezium/connector/spanner/BasicSanityCheckIT.java

cc: @dongwook-chan @sean-k1

@dongwook-chan
Copy link
Contributor Author

dongwook-chan commented Oct 5, 2024

@nancyxu123
Thank you for your review.

(1)
Our initial motivation was this Jira issue: https://issues.redhat.com/browse/DBZ-6998
And we confirmed that there are a number of issues regarding abstraction, that is, enabling other connectors to use vendor-specific features.
So we concluded that it make sense to deal with this issue too.

(2)
We're trying to add the integration test to [BasicSanityCheckIT.java](https://github.com/debezium/debezium-connector-spanner/blob/main/src/test/java/io/debezium/connector/spanner/BasicSanityCheckIT.java) as you suggested.
But not sure how to test the individual metrics.
Would the following code be sufficient?
Since we're focusing on temporal metrics, these are by nature practically impossible to predict in advance (code-time).

assertThat(mBeanServer.isRegistered(objectName, "totalLatency")).isEqualTo(true);
assertThat(mBeanServer.isRegistered(objectName, "connectorLatency")).isEqualTo(true);
// and same for the other metrics as well

@nancyxu123
Copy link
Contributor

@nancyxu123 Thank you for your review.

(1) Our initial motivation was this Jira issue: https://issues.redhat.com/browse/DBZ-6998 And we confirmed that there are a number of issues regarding abstraction, that is, enabling other connectors to use vendor-specific features. So we concluded that it make sense to deal with this issue too.

(2) We're trying to add the integration test to [BasicSanityCheckIT.java](https://github.com/debezium/debezium-connector-spanner/blob/main/src/test/java/io/debezium/connector/spanner/BasicSanityCheckIT.java) as you suggested. But not sure how to test the individual metrics. Would the following code be sufficient? Since we're focusing on temporal metrics, these are by nature practically impossible to predict in advance (code-time).

assertThat(mBeanServer.isRegistered(objectName, "totalLatency")).isEqualTo(true);
assertThat(mBeanServer.isRegistered(objectName, "connectorLatency")).isEqualTo(true);
// and same for the other metrics as well

Sounds good, thanks for the explanation!

Copy link
Collaborator

@jpechane jpechane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nancyxu123 Feel free to merge when you are satisifed with tests.

@dongwook-chan
Copy link
Contributor Author

@nancyxu123
Pls merge.

@nancyxu123 nancyxu123 merged commit e425b99 into debezium:main Oct 21, 2024
2 checks passed
@dongwook-chan
Copy link
Contributor Author

dongwook-chan commented Nov 2, 2024

@jpechane
I'm terribly sorry that you had to revert in #98.
I only ran unit tests to validate the code.
This is totally on me.

To resolve the issue, I tried running integration tests.
The following are the steps I took.

  1. build the project ('compile' lifecycle)
  2. mvn docker:build
  3. mvn docker:start
    • this command started docker container gcr.io/cloud-spanner-emulator/emulator
  4. Ran BasicSanityCheckIT

But the test failed and especially for running BasicSanityCheckIT, I got following logs and error.

Starting Kafka environment

Test ignored.

Test ignored.

Test ignored.

Test ignored.

java.lang.ExceptionInInitializerError
	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1160)
	at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.ensureClassInitialized(MethodHandleAccessorFactory.java:300)
	at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.newMethodAccessor(MethodHandleAccessorFactory.java:71)
	at java.base/jdk.internal.reflect.ReflectionFactory.newMethodAccessor(ReflectionFactory.java:159)
	at java.base/java.lang.reflect.Method.acquireMethodAccessor(Method.java:726)
	at java.base/java.lang.reflect.Method.invoke(Method.java:577)
	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725)
	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:126)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptBeforeAllMethod(TimeoutExtension.java:68)
	at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllMethods$11(ClassBasedTestDescriptor.java:397)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllMethods(ClassBasedTestDescriptor.java:395)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:209)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:80)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:148)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
	at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
	at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
	at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
	at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
	Suppressed: java.lang.NoClassDefFoundError: Could not initialize class io.debezium.connector.spanner.AbstractSpannerConnectorIT
		at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
		at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1160)
		at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.ensureClassInitialized(MethodHandleAccessorFactory.java:300)
		at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.newMethodAccessor(MethodHandleAccessorFactory.java:71)
		at java.base/jdk.internal.reflect.ReflectionFactory.newMethodAccessor(ReflectionFactory.java:159)
		at java.base/java.lang.reflect.Method.acquireMethodAccessor(Method.java:726)
		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
		at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725)
		at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
		at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
		at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
		at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:126)
		at org.junit.jupiter.engine.extension.TimeoutExtension.interceptAfterAllMethod(TimeoutExtension.java:116)
		at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
		at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
		at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
		at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
		at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
		at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
		at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
		at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
		at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeAfterAllMethods$13(ClassBasedTestDescriptor.java:425)
		at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
		at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeAfterAllMethods$14(ClassBasedTestDescriptor.java:423)
		at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
		at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1116)
		at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeAfterAllMethods(ClassBasedTestDescriptor.java:423)
		at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.after(ClassBasedTestDescriptor.java:225)
		at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.after(ClassBasedTestDescriptor.java:80)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:161)
		at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:161)
		... 33 more
	Caused by: java.lang.ExceptionInInitializerError: Exception org.testcontainers.containers.ContainerLaunchException: Container startup failed [in thread "main"]
		at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:349)
		at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:322)
		at org.testcontainers.containers.ContainerisedDockerCompose.invoke(DockerComposeContainer.java:697)
		at org.testcontainers.containers.DockerComposeContainer.runWithCompose(DockerComposeContainer.java:335)
		at org.testcontainers.containers.DockerComposeContainer.createServices(DockerComposeContainer.java:256)
		at org.testcontainers.containers.DockerComposeContainer.start(DockerComposeContainer.java:187)
		at io.debezium.connector.spanner.util.KafkaEnvironment.start(KafkaEnvironment.java:56)
		at io.debezium.connector.spanner.AbstractSpannerConnectorIT.<clinit>(AbstractSpannerConnectorIT.java:29)
		at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
		at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1160)
		at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.ensureClassInitialized(MethodHandleAccessorFactory.java:300)
		at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.newMethodAccessor(MethodHandleAccessorFactory.java:71)
		at java.base/jdk.internal.reflect.ReflectionFactory.newMethodAccessor(ReflectionFactory.java:159)
		at java.base/java.lang.reflect.Method.acquireMethodAccessor(Method.java:726)
		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
		at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725)
		at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
		at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
		at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
		at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:126)
		at org.junit.jupiter.engine.extension.TimeoutExtension.interceptBeforeAllMethod(TimeoutExtension.java:68)
		at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
		at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
		at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
		at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
		at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
		at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
		at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
		at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
		at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllMethods$11(ClassBasedTestDescriptor.java:397)
		at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
		at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllMethods(ClassBasedTestDescriptor.java:395)
		at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:209)
		at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:80)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:148)
		at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
		... 33 more
	Suppressed: java.lang.NoClassDefFoundError: Could not initialize class io.debezium.connector.spanner.AbstractSpannerConnectorIT
		at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
		at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1160)
		at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.ensureClassInitialized(MethodHandleAccessorFactory.java:300)
		at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.newMethodAccessor(MethodHandleAccessorFactory.java:71)
		at java.base/jdk.internal.reflect.ReflectionFactory.newMethodAccessor(ReflectionFactory.java:159)
		at java.base/java.lang.reflect.Method.acquireMethodAccessor(Method.java:726)
		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
		at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725)
		at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
		at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
		at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
		at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:126)
		at org.junit.jupiter.engine.extension.TimeoutExtension.interceptAfterAllMethod(TimeoutExtension.java:116)
		at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
		at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
		at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
		at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
		at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
		at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
		at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
		at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
		at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeAfterAllMethods$13(ClassBasedTestDescriptor.java:425)
		at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
		at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeAfterAllMethods$14(ClassBasedTestDescriptor.java:423)
		at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
		at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1116)
		at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeAfterAllMethods(ClassBasedTestDescriptor.java:423)
		at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.after(ClassBasedTestDescriptor.java:225)
		at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.after(ClassBasedTestDescriptor.java:80)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:161)
		at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:161)
		... 33 more
	Caused by: [CIRCULAR REFERENCE: java.lang.ExceptionInInitializerError: Exception org.testcontainers.containers.ContainerLaunchException: Container startup failed [in thread "main"]]
Caused by: org.testcontainers.containers.ContainerLaunchException: Container startup failed
	at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:349)
	at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:322)
	at org.testcontainers.containers.ContainerisedDockerCompose.invoke(DockerComposeContainer.java:697)
	at org.testcontainers.containers.DockerComposeContainer.runWithCompose(DockerComposeContainer.java:335)
	at org.testcontainers.containers.DockerComposeContainer.createServices(DockerComposeContainer.java:256)
	at org.testcontainers.containers.DockerComposeContainer.start(DockerComposeContainer.java:187)
	at io.debezium.connector.spanner.util.KafkaEnvironment.start(KafkaEnvironment.java:56)
	at io.debezium.connector.spanner.AbstractSpannerConnectorIT.<clinit>(AbstractSpannerConnectorIT.java:29)
	... 62 more
Caused by: org.rnorth.ducttape.RetryCountExceededException: Retry limit hit with exception
	at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:88)
	at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:334)
	... 69 more
Caused by: org.testcontainers.containers.ContainerLaunchException: Could not create/start container
	at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:542)
	at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:344)
	at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
	... 70 more
Caused by: java.lang.IllegalStateException: Container did not start correctly.
	at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:480)
	... 72 more

Could I get some advice on how to run integration tests?
And should running integration tests successfully be sufficient to resolve the error you faced in #98.

@jpechane
Copy link
Collaborator

jpechane commented Nov 4, 2024

Hi, I'd recommend to re-build the core repo locally (with clean) and then do the same with Spanner repo.
Also ae you running it from Maven or from IDE? I'd focus on getting it running from Maven first.

@dongwook-chan
Copy link
Contributor Author

@jpechane
I tried to build locally debezium-core from debezium repo with clean option.
However this doesn't seem to affect the result of cleanly building debezium-connector-spanner.
I keep getting issues in the test process debezium-connector-spanner as below.

 Tests run: 435, Failures: 1, Errors: 193, Skipped: 3

To be honest, I'm really not sure what I'm doing wrong here at this point.
So help me out please!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants