That timezone issue sounds like a bug either way, so you can file a Jira issue about that.
On Thu, Mar 3, 2022 at 12:25 AM Atul Pendse <apen...@tintri.com.invalid> wrote: > > Some additional info. Allowing the port only resolved issue with tests > related to creating UDP socket. > > HtmlLayoutTest was failing due to the timezone I am in. I am in GMT+0530 > timezone, and test always fails. It just appears to ignore the ‘minutes’ part > of timezone. > The test works fine when I set my region to US, or something which has ‘00’ > in minutes part. > > Thanks, > Atul > > From: Atul Pendse <apen...@tintri.com.INVALID> > Date: Thursday, 3 March 2022 at 7:28 AM > To: dev@logging.apache.org <dev@logging.apache.org> > Subject: Re: MacOS: Unit tests failing on release-2.x branch > It also fails when I run it individually from eclipse, with the same log. > I will have a look at my firewall settings like Matt suggested in another > email. > > Thanks, > Atul > > > From: Ralph Goers <ralph.go...@dslextreme.com> > Date: Thursday, 3 March 2022 at 3:31 AM > To: dev@logging.apache.org <dev@logging.apache.org> > Subject: Re: MacOS: Unit tests failing on release-2.x branch > I have never seen the errors you are getting. I work on a MacBook Pro that is > Intel-based. Others have had issues with newer MacBooks that are using Apples > M1 chip, but I don’t think they have seen it fail this way. It is clear the > SocketAppenderTest is failing due to the port already being in use. > > Can you run each test by itself and post the logs from that? > > Ralph > > > On Mar 2, 2022, at 6:21 AM, Atul Pendse <apen...@tintri.com.INVALID> wrote: > > > > Hi Volkan, > > > > I ran `./mvnw clean verify -Dsurefire.rerunFailingTestsCount=2` as you > > suggested. > > The tests failed during each retry. > > > > > > [ERROR] Failures: > > > > [ERROR] SocketAppenderTest.testUdpAppender:211 No event retrieved > > > > [ERROR] > > org.apache.logging.log4j.core.appender.SyslogAppenderCustomLayoutTest.testUDPAppender > > > > [ERROR] Run 1: > > SyslogAppenderCustomLayoutTest>SyslogAppenderTest.testUDPAppender:79->SyslogAppenderTestBase.sendAndCheckLegacyBsdMessage:72->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > > The number of received messages should be equal with the number of sent > > messages expected:<1> but was:<0> > > > > [ERROR] Run 2: > > SyslogAppenderCustomLayoutTest>SyslogAppenderTest.testUDPAppender:79->SyslogAppenderTestBase.sendAndCheckLegacyBsdMessage:72->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > > The number of received messages should be equal with the number of sent > > messages expected:<1> but was:<0> > > > > [ERROR] Run 3: > > SyslogAppenderCustomLayoutTest>SyslogAppenderTest.testUDPAppender:79->SyslogAppenderTestBase.sendAndCheckLegacyBsdMessage:72->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > > The number of received messages should be equal with the number of sent > > messages expected:<1> but was:<0> > > > > [INFO] > > > > [ERROR] > > org.apache.logging.log4j.core.appender.SyslogAppenderCustomLayoutTest.testUDPStructuredAppender > > > > [ERROR] Run 1: > > SyslogAppenderCustomLayoutTest>SyslogAppenderTest.testUDPStructuredAppender:88->SyslogAppenderTestBase.sendAndCheckStructuredMessage:91->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > > The number of received messages should be equal with the number of sent > > messages expected:<1> but was:<0> > > > > [ERROR] Run 2: > > SyslogAppenderCustomLayoutTest>SyslogAppenderTest.testUDPStructuredAppender:88->SyslogAppenderTestBase.sendAndCheckStructuredMessage:91->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > > The number of received messages should be equal with the number of sent > > messages expected:<1> but was:<0> > > > > [ERROR] Run 3: > > SyslogAppenderCustomLayoutTest>SyslogAppenderTest.testUDPStructuredAppender:88->SyslogAppenderTestBase.sendAndCheckStructuredMessage:91->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > > The number of received messages should be equal with the number of sent > > messages expected:<1> but was:<0> > > > > [INFO] > > > > [ERROR] > > org.apache.logging.log4j.core.appender.SyslogAppenderTest.testUDPAppender > > > > [ERROR] Run 1: > > SyslogAppenderTest.testUDPAppender:79->SyslogAppenderTestBase.sendAndCheckLegacyBsdMessage:72->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > > The number of received messages should be equal with the number of sent > > messages expected:<1> but was:<0> > > > > [ERROR] Run 2: > > SyslogAppenderTest.testUDPAppender:79->SyslogAppenderTestBase.sendAndCheckLegacyBsdMessage:72->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > > The number of received messages should be equal with the number of sent > > messages expected:<1> but was:<0> > > > > [ERROR] Run 3: > > SyslogAppenderTest.testUDPAppender:79->SyslogAppenderTestBase.sendAndCheckLegacyBsdMessage:72->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > > The number of received messages should be equal with the number of sent > > messages expected:<1> but was:<0> > > > > [INFO] > > > > [ERROR] > > org.apache.logging.log4j.core.appender.SyslogAppenderTest.testUDPStructuredAppender > > > > [ERROR] Run 1: > > SyslogAppenderTest.testUDPStructuredAppender:88->SyslogAppenderTestBase.sendAndCheckStructuredMessage:91->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > > The number of received messages should be equal with the number of sent > > messages expected:<1> but was:<0> > > > > [ERROR] Run 2: > > SyslogAppenderTest.testUDPStructuredAppender:88->SyslogAppenderTestBase.sendAndCheckStructuredMessage:91->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > > The number of received messages should be equal with the number of sent > > messages expected:<1> but was:<0> > > > > [ERROR] Run 3: > > SyslogAppenderTest.testUDPStructuredAppender:88->SyslogAppenderTestBase.sendAndCheckStructuredMessage:91->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > > The number of received messages should be equal with the number of sent > > messages expected:<1> but was:<0> > > > > [INFO] > > > > [ERROR] > > org.apache.logging.log4j.core.appender.TlsSyslogAppenderTest.testUDPAppender > > > > [ERROR] Run 1: > > TlsSyslogAppenderTest>SyslogAppenderTest.testUDPAppender:79->SyslogAppenderTestBase.sendAndCheckLegacyBsdMessage:72->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > > The number of received messages should be equal with the number of sent > > messages expected:<1> but was:<0> > > > > [ERROR] Run 2: > > TlsSyslogAppenderTest>SyslogAppenderTest.testUDPAppender:79->SyslogAppenderTestBase.sendAndCheckLegacyBsdMessage:72->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > > The number of received messages should be equal with the number of sent > > messages expected:<1> but was:<0> > > > > [ERROR] Run 3: > > TlsSyslogAppenderTest>SyslogAppenderTest.testUDPAppender:79->SyslogAppenderTestBase.sendAndCheckLegacyBsdMessage:72->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > > The number of received messages should be equal with the number of sent > > messages expected:<1> but was:<0> > > > > [INFO] > > > > [ERROR] > > org.apache.logging.log4j.core.appender.TlsSyslogAppenderTest.testUDPStructuredAppender > > > > [ERROR] Run 1: > > TlsSyslogAppenderTest>SyslogAppenderTest.testUDPStructuredAppender:88->SyslogAppenderTestBase.sendAndCheckStructuredMessage:91->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > > The number of received messages should be equal with the number of sent > > messages expected:<1> but was:<0> > > > > [ERROR] Run 2: > > TlsSyslogAppenderTest>SyslogAppenderTest.testUDPStructuredAppender:88->SyslogAppenderTestBase.sendAndCheckStructuredMessage:91->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > > The number of received messages should be equal with the number of sent > > messages expected:<1> but was:<0> > > > > [ERROR] Run 3: > > TlsSyslogAppenderTest>SyslogAppenderTest.testUDPStructuredAppender:88->SyslogAppenderTestBase.sendAndCheckStructuredMessage:91->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > > The number of received messages should be equal with the number of sent > > messages expected:<1> but was:<0> > > > > [INFO] > > > > [ERROR] > > org.apache.logging.log4j.core.layout.HtmlLayoutTest.testLayoutWithDatePatternFixedFormat > > > > [ERROR] Run 1: > > HtmlLayoutTest.testLayoutWithDatePatternFixedFormat:242->testLayoutWithDatePatternFixedFormat:273 > > Incorrect date=<td>2012-11-02T14:34:02,123+05</td>, > > format=ISO8601_OFFSET_DATE_TIME_HH, timezone=null ==> expected: > > <<td>2012-11-02T14:34:02,123+0530</td>> but was: > > <<td>2012-11-02T14:34:02,123+05</td>> > > > > [ERROR] Run 2: > > HtmlLayoutTest.testLayoutWithDatePatternFixedFormat:242->testLayoutWithDatePatternFixedFormat:273 > > Incorrect date=<td>2012-11-02T14:34:02,123+05</td>, > > format=ISO8601_OFFSET_DATE_TIME_HH, timezone=null ==> expected: > > <<td>2012-11-02T14:34:02,123+0530</td>> but was: > > <<td>2012-11-02T14:34:02,123+05</td>> > > > > [ERROR] Run 3: > > HtmlLayoutTest.testLayoutWithDatePatternFixedFormat:242->testLayoutWithDatePatternFixedFormat:273 > > Incorrect date=<td>2012-11-02T14:34:02,123+05</td>, > > format=ISO8601_OFFSET_DATE_TIME_HH, timezone=null ==> expected: > > <<td>2012-11-02T14:34:02,123+0530</td>> but was: > > <<td>2012-11-02T14:34:02,123+05</td>> > > > > [INFO] > > > > [ERROR] Errors: > > > > [ERROR] org.apache.logging.log4j.core.appender.SocketAppenderTest.null > > > > [ERROR] Run 1: SocketAppenderTest.setupClass:80 » Bind Address already in > > use (Bind failed) > > > > [ERROR] Run 2: SocketAppenderTest.setupClass:80 » Bind Address already in > > use (Bind failed) > > > > [INFO] > > > > [INFO] > > > > [ERROR] Tests run: 2353, Failures: 8, Errors: 1, Skipped: 14 > > > > > > Thanks, > > Atul > > ________________________________ > > From: Volkan Yazıcı <vol...@yazi.ci> > > Sent: Wednesday, March 2, 2022 5:46 PM > > To: Apache Logging Developers List <dev@logging.apache.org> > > Subject: Re: MacOS: Unit tests failing on release-2.x branch > > > > Unstable HtmlLayoutTest is a known issue, see LOG4J2-3019 > > <https://issues.apache.org/jira/browse/LOG4J2-3019>. For others, I don't > > have an idea. Though I would advise using the following command instead: > > `./mvnw clean verify -Dsurefire.rerunFailingTestsCount=2`. `./mvnw` will > > align the used Maven version and `-Dsurefire.rerunFailingTestsCount=2` will > > repeat failing tests, which (unfortunately) helps with timing sensitive > > tests, e.g., involving sockets and such. > > > > On Wed, Mar 2, 2022 at 9:30 AM Atul Pendse <apen...@tintri.com.invalid> > > wrote: > > > >> Hi, > >> > >> > >> > >> I have checked out latest code from log4j release-2.x branch. > >> > >> While trying to run ‘mvn clean install’, few unit tests in log4j-core are > >> failing with below error > >> > >> > >> > >> [INFO] Results: > >> > >> [INFO] > >> > >> [ERROR] Failures: > >> > >> [ERROR] SocketAppenderTest.testUdpAppender:211 No event retrieved > >> > >> [ERROR] > >> SyslogAppenderCustomLayoutTest>SyslogAppenderTest.testUDPAppender:79->SyslogAppenderTestBase.sendAndCheckLegacyBsdMessage:72->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > >> The number of received messages should be equal with the number of sent > >> messages expected:<1> but was:<0> > >> > >> [ERROR] > >> SyslogAppenderCustomLayoutTest>SyslogAppenderTest.testUDPStructuredAppender:88->SyslogAppenderTestBase.sendAndCheckStructuredMessage:91->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > >> The number of received messages should be equal with the number of sent > >> messages expected:<1> but was:<0> > >> > >> [ERROR] > >> SyslogAppenderTest.testUDPAppender:79->SyslogAppenderTestBase.sendAndCheckLegacyBsdMessage:72->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > >> The number of received messages should be equal with the number of sent > >> messages expected:<1> but was:<0> > >> > >> [ERROR] > >> SyslogAppenderTest.testUDPStructuredAppender:88->SyslogAppenderTestBase.sendAndCheckStructuredMessage:91->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > >> The number of received messages should be equal with the number of sent > >> messages expected:<1> but was:<0> > >> > >> [ERROR] > >> TlsSyslogAppenderTest>SyslogAppenderTest.testUDPAppender:79->SyslogAppenderTestBase.sendAndCheckLegacyBsdMessage:72->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > >> The number of received messages should be equal with the number of sent > >> messages expected:<1> but was:<0> > >> > >> [ERROR] > >> TlsSyslogAppenderTest>SyslogAppenderTest.testUDPStructuredAppender:88->SyslogAppenderTestBase.sendAndCheckStructuredMessage:91->SyslogAppenderTestBase.checkTheNumberOfSentAndReceivedMessages:110 > >> The number of received messages should be equal with the number of sent > >> messages expected:<1> but was:<0> > >> > >> [ERROR] > >> HtmlLayoutTest.testLayoutWithDatePatternFixedFormat:242->testLayoutWithDatePatternFixedFormat:273 > >> Incorrect date=<td>2012-11-02T14:34:02,123+05</td>, > >> format=ISO8601_OFFSET_DATE_TIME_HH, timezone=null ==> expected: > >> <<td>2012-11-02T14:34:02,123+0530</td>> but was: > >> <<td>2012-11-02T14:34:02,123+05</td>> > >> > >> [INFO] > >> > >> [ERROR] Tests run: 2352, Failures: 8, Errors: 0, Skipped: 14 > >> > >> > >> > >> > >> > >> Attached is complete build log. > >> > >> > >> > >> My build env is: > >> > >> > >> > >> atulpendse@Atuls-MacBook-Pro logging-log4j2 % mvn -v > >> > >> *Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)* > >> > >> Maven home: /Users/atulpendse/tools/apache-maven-3.8.4 > >> > >> Java version: 1.8.0_322, vendor: Amazon.com Inc., runtime: > >> /Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home/jre > >> > >> Default locale: en_GB, platform encoding: UTF-8 > >> > >> OS name: "mac os x", version: "12.0.1", arch: "x86_64", family: "mac" > >> > >> > >> > >> I have tried to run as sudo, thinking it might be issue with the UDP port > >> that unit test is using, but got the same error. > >> > >> The port 8199 (used by unit test) is not in use. > >> > >> > >> > >> atulpendse@Atuls-MacBook-Pro logging-log4j2 % sudo netstat -nlat | grep > >> 8199 > >> > >> atulpendse@Atuls-MacBook-Pro logging-log4j2 % > >> > >> > >> > >> Exactly same code builds without any issue on my CentOS 7 machine. > >> > >> > >> > >> Has anyone come across such an issue, or know how to work around it? > >> > >> Thanks for help. > >> > >> > >> > >> Thanks, > >> > >> Atul > >>