linghengqian commented on issue #36672:
URL: 
https://github.com/apache/shardingsphere/issues/36672#issuecomment-3640963107

   > Testing at 
[linghengqian/shardingsphere-switch-mode-test@59bb789](https://github.com/linghengqian/shardingsphere-switch-mode-test/commit/59bb789bc320c618e05ddd1fa44fcc7e2f46f34b)
 yielded a strange result; for the more recent 
[bb359f2](https://github.com/apache/shardingsphere/commit/bb359f23f81f8eb279cd7e804f2cd6e3a924b37d)
 , this bug no longer exists.
   > 
   > I need additional time to confirm what happened to the master branch of 
Shardingsphere.
   
   The `io.github.linghengqian.SimpleTest` at 
https://github.com/linghengqian/shardingsphere-switch-mode-test/commit/87a85f499fe4625a35c47212c4f08b562e4c70f9
 demonstrates a fascinating phenomenon. Based on the same deliverable from 
https://github.com/apache/shardingsphere/commit/2833e306106891588ddbb76b65c3b313c24a90f8
 , and with the same version of test dependencies, `SimpleTest` executes 
normally in https://github.com/linghengqian/shardingsphere-switch-mode-test .
   ```shell
   [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 17.24 
s -- in io.github.linghengqian.SimpleTest
   [INFO] 
   [INFO] Results:
   [INFO] 
   [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
   ```
   However, copying this unit test to the 
`org.apache.shardingsphere:shardingsphere-test-native` Maven module results in 
execution failure.
   ```shell
   [INFO] Running 
org.apache.shardingsphere.test.natived.jdbc.modes.cluster.SimpleTest
   WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
   WARNING: sun.misc.Unsafe::objectFieldOffset has been called by 
com.github.benmanes.caffeine.cache.UnsafeAccess 
(file:/C:/Users/lingh/.m2/repository/com/github/ben-manes/caffeine/caffeine/2.9.3/caffeine-2.9.3.jar)
   WARNING: Please consider reporting this to the maintainers of class 
com.github.benmanes.caffeine.cache.UnsafeAccess
   WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future 
release
   [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 
307.1 s <<< FAILURE! -- in 
org.apache.shardingsphere.test.natived.jdbc.modes.cluster.SimpleTest
   [ERROR] 
org.apache.shardingsphere.test.natived.jdbc.modes.cluster.SimpleTest.assertModes
 -- Time elapsed: 269.8 s <<< ERROR!
   org.awaitility.core.ConditionTimeoutException: Condition with Lambda 
expression in 
org.apache.shardingsphere.test.natived.jdbc.modes.cluster.SimpleTest was not 
fulfilled within 1 minutes.
           at 
org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
           at 
org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
           at 
org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
           at 
org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1160)
           at 
org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1129)
           at 
org.apache.shardingsphere.test.natived.jdbc.modes.cluster.SimpleTest.initEnvironment(SimpleTest.java:70)
           at 
org.apache.shardingsphere.test.natived.jdbc.modes.cluster.SimpleTest.assertZookeeper(SimpleTest.java:60)
           at 
org.apache.shardingsphere.test.natived.jdbc.modes.cluster.SimpleTest.assertModes(SimpleTest.java:35)
           at java.base/java.lang.reflect.Method.invoke(Method.java:565)
           at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
           at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
   Caused by: 
org.apache.shardingsphere.infra.exception.kernel.metadata.TableNotFoundException:
 Table or view 't_order' does not exist.
           at 
org.apache.shardingsphere.infra.binder.engine.segment.dml.from.type.SimpleTableSegmentBinder.lambda$checkTableExists$7(SimpleTableSegmentBinder.java:179)
           at 
org.apache.shardingsphere.infra.exception.ShardingSpherePreconditions.checkState(ShardingSpherePreconditions.java:44)
           at 
org.apache.shardingsphere.infra.binder.engine.segment.dml.from.type.SimpleTableSegmentBinder.checkTableExists(SimpleTableSegmentBinder.java:179)
           at 
org.apache.shardingsphere.infra.binder.engine.segment.dml.from.type.SimpleTableSegmentBinder.bind(SimpleTableSegmentBinder.java:94)
           at 
org.apache.shardingsphere.infra.binder.engine.segment.dml.from.TableSegmentBinder.bind(TableSegmentBinder.java:57)
           at 
org.apache.shardingsphere.infra.binder.engine.statement.dml.SelectStatementBinder.lambda$bind$1(SelectStatementBinder.java:72)
           at java.base/java.util.Optional.map(Optional.java:260)
           at 
org.apache.shardingsphere.infra.binder.engine.statement.dml.SelectStatementBinder.bind(SelectStatementBinder.java:72)
           at 
org.apache.shardingsphere.infra.binder.engine.type.DMLStatementBindEngine.bind(DMLStatementBindEngine.java:45)
           at 
org.apache.shardingsphere.infra.binder.engine.SQLBindEngine.bindSQLStatement(SQLBindEngine.java:73)
           at 
org.apache.shardingsphere.infra.binder.engine.SQLBindEngine.bind(SQLBindEngine.java:59)
           at 
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.createQueryContext(ShardingSphereStatement.java:260)
           at 
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.execute(ShardingSphereStatement.java:247)
           at 
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.execute(ShardingSphereStatement.java:195)
           at 
com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:94)
           at 
com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java)
           at 
org.apache.shardingsphere.test.natived.jdbc.modes.cluster.SimpleTest.doSql(SimpleTest.java:92)
           at 
org.apache.shardingsphere.test.natived.jdbc.modes.cluster.SimpleTest.lambda$initEnvironment$0(SimpleTest.java:71)
           at 
org.awaitility.core.CallableCondition$ConditionEvaluationWrapper.eval(CallableCondition.java:99)
           at 
org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:248)
           at 
org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:235)
           at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
           at java.base/java.lang.Thread.run(Thread.java:1474)
   
   [INFO] 
   [INFO] Results:
   [INFO] 
   [ERROR] Errors: 
   [ERROR]   SimpleTest.assertModes:35->assertZookeeper:60->initEnvironment:70 
? ConditionTimeout Condition with Lambda expression in 
org.apache.shardingsphere.test.natived.jdbc.modes.cluster.SimpleTest was not 
fulfilled within 1 minutes.                                                     
                                                
   [INFO] 
   [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
   ```
   - The only difference is that 
`org.apache.shardingsphere:shardingsphere-test-native` contains a whole bunch 
of extra, unmanaged dependencies. Let me continue to investigate where the 
problem lies...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to