linghengqian commented on code in PR #5375:
URL: https://github.com/apache/hive/pull/5375#discussion_r1802544007


##########
data/conf/hive-log4j2.properties:
##########
@@ -14,9 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-status = INFO

Review Comment:
   > Can we only keep the `status`? (can replace with the new property)
   
   - If we just add `<log4j2.statusLoggerLevel>INFO</log4j2.statusLoggerLevel>` 
on top of the current commit, this will absolutely cause errors again, since 
all the unit tests are based on **brittle output matching**. A simple example:
   
   ```shell
   sdk install java 8.0.422-tem
   sdk use java 8.0.422-tem
   sdk install maven
   mvn clean install -DskipTests
   mvn test -Dtest=TestHplsqlLocal -pl hplsql
   ```
   
   - You will see that the output does not match.
   
   ```shell
   [INFO] -------------------------------------------------------
   [INFO]  T E S T S
   [INFO] -------------------------------------------------------
   [INFO] Running org.apache.hive.hplsql.TestHplsqlLocal
   [ERROR] Tests run: 86, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 
3.407 s <<< FAILURE! - in org.apache.hive.hplsql.TestHplsqlLocal
   [ERROR] org.apache.hive.hplsql.TestHplsqlLocal.testException  Time elapsed: 
0.636 s  <<< FAILURE!
   org.junit.ComparisonFailure: 
   expected:<[]Ln:2 PRINT
   Correct
   L...> but was:<[2024-10-16T07:47:57.728Z main INFO Using provider:
   Provider 'org.apache.logging.log4j.core.impl.Log4jProvider'
           priority = 10
           loggerContextFactory = 
org.apache.logging.log4j.core.impl.Log4jContextFactory
   ]Ln:2 PRINT
   Correct
   L...>
           at org.junit.Assert.assertEquals(Assert.java:117)
           at org.junit.Assert.assertEquals(Assert.java:146)
           at 
org.apache.hive.hplsql.TestHplsqlLocal.run(TestHplsqlLocal.java:482)
           at 
org.apache.hive.hplsql.TestHplsqlLocal.testException(TestHplsqlLocal.java:229)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at 
java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
           at 
java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
           at java.util.Iterator.forEachRemaining(Iterator.java:116)
           at 
java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
           at 
java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
           at 
java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
           at 
java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
           at 
java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
           at 
java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
           at 
java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
   
   [INFO] 
   [INFO] Results:
   [INFO] 
   [ERROR] Failures: 
   [ERROR]   TestHplsqlLocal.testException:229->run:482 expected:<[]Ln:2 PRINT
   Correct
   L...> but was:<[2024-10-16T07:47:57.728Z main INFO Using provider:
   Provider 'org.apache.logging.log4j.core.impl.Log4jProvider'
           priority = 10
           loggerContextFactory = 
org.apache.logging.log4j.core.impl.Log4jContextFactory
   ]Ln:2 PRINT
   Correct
   L...>
   [INFO] 
   [ERROR] Tests run: 86, Failures: 1, Errors: 0, Skipped: 0
   [INFO] 
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  13.799 s
   [INFO] Finished at: 2024-10-16T15:48:01+08:00
   [INFO] 
------------------------------------------------------------------------
   
   ```
   



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to