# Weird DateFormattersTests failure in Git repository

**URL:** <https://discuss.elastic.co/t/weird-dateformatterstests-failure-in-git-repository/151612>\
**Category:** Elasticsearch\
**Created:** [October 9, 2018, 10:48am UTC](https://discuss.elastic.co/t/weird-dateformatterstests-failure-in-git-repository/151612 "2018-10-09T10:48:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cbismuth](https://avatars.discourse-cdn.com/v4/letter/c/9e8a1a/32.png) [@cbismuth](https://discuss.elastic.co/u/cbismuth)\
**Post date:** [October 9, 2018, 10:48am UTC](https://discuss.elastic.co/t/weird-dateformatterstests-failure-in-git-repository/151612/1 "2018-10-09T10:48:28Z")

</div>

Hi,

I encountered a weird [DateFormattersTests](https://github.com/elastic/elasticsearch/blob/b1b0f3276b060c287e465fcbfdf47cbc6d40e362/server/src/test/java/org/elasticsearch/common/time/DateFormattersTests.java#L80-L89) failure while running a `gradlew check`.

Here is the line to reproduce below, does any one understand why this test fails?

Besides, when I run it within IntelliJ, it passes ...

Thanks,  
Chris

```auto
Suite: org.elasticsearch.common.time.DateFormattersTests
  1> [2018-10-09T12:42:23,575][WARN][o.e.b.JNANatives] [[SUITE-DateFormattersTests-seed#[989AA2D5B26A1236]]] Unable to lock JVM Memory: error=12, reason=Cannot allocate memory
  1> [2018-10-09T12:42:23,580][WARN][o.e.b.JNANatives] [[SUITE-DateFormattersTests-seed#[989AA2D5B26A1236]]] This can result in part of the JVM being swapped out.
  1> [2018-10-09T12:42:23,581][WARN][o.e.b.JNANatives] [[SUITE-DateFormattersTests-seed#[989AA2D5B26A1236]]] Increase RLIMIT_MEMLOCK, soft limit: 65536, hard limit: 65536
  1> [2018-10-09T12:42:23,582][WARN][o.e.b.JNANatives] [[SUITE-DateFormattersTests-seed#[989AA2D5B26A1236]]] These can be adjusted by modifying /etc/security/limits.conf, for example: 
  1> # allow user 'cbismuth' mlockall
  1> cbismuth soft memlock unlimited
  1> cbismuth hard memlock unlimited
  1> [2018-10-09T12:42:23,583][WARN][o.e.b.JNANatives] [[SUITE-DateFormattersTests-seed#[989AA2D5B26A1236]]] If you are logged in interactively, you will have to re-login for the new limits to take effect.
  1> [2018-10-09T14:42:24,957][INFO][o.e.c.t.DateFormattersTests] [testLocales] before test
  1> [2018-10-09T14:42:25,399][INFO][o.e.c.t.DateFormattersTests] [testLocales] after test
  2> REPRODUCE WITH: ./gradlew :server:test -Dtests.seed=989AA2D5B26A1236 -Dtests.class=org.elasticsearch.common.time.DateFormattersTests -Dtests.method="testLocales" -Dtests.security.manager=true -Dtests.locale=ar-LB -Dtests.timezone=Asia/Muscat -Dtests.distribution=oss-zip -Dcompiler.java=11 -Druntime.java=8
FAILURE 0.53s | DateFormattersTests.testLocales <<< FAILURES!
   > Throwable #1: junit.framework.AssertionFailedError: Expected exception IllegalArgumentException but no exception was thrown
   > at __randomizedtesting.SeedInfo.seed([989AA2D5B26A1236:E53315FCC176BA66]:0)
   > at org.apache.lucene.util.LuceneTestCase.expectThrows(LuceneTestCase.java:2687)
   > at org.apache.lucene.util.LuceneTestCase.expectThrows(LuceneTestCase.java:2672)
   > at org.elasticsearch.common.time.DateFormattersTests.testLocales(DateFormattersTests.java:85)
   > at java.lang.Thread.run(Thread.java:748)
  2> NOTE: leaving temporary files on disk at: /home/cbismuth/git/elasticsearch/server/build/testrun/test/J0/temp/org.elasticsearch.common.time.DateFormattersTests_989AA2D5B26A1236-001
  2> NOTE: test params are: codec=Asserting(Lucene80): {}, docValues:{}, maxPointsInLeafNode=505, maxMBSortInHeap=5.159543813935031, sim=Asserting(org.apache.lucene.search.similarities.AssertingSimilarity@14a3f7e0), locale=ar-LB, timezone=Asia/Muscat
  2> NOTE: Linux 4.15.0-36-generic amd64/Oracle Corporation 1.8.0_181 (64-bit)/cpus=4,threads=1,free=420529136,total=514850816
  2> NOTE: All tests run in this JVM: [DateFormattersTests]
Completed [1/1] in 2.76s, 1 test, 1 failure <<< FAILURES!

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 6, 2018, 10:50am UTC](https://discuss.elastic.co/t/weird-dateformatterstests-failure-in-git-repository/151612/2 "2018-11-06T10:50:05Z")

</div>

Closed on November 6, 2018, 10:50am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
