You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by "Matt Foley (JIRA)" <ji...@apache.org> on 2017/03/14 20:46:41 UTC

[jira] [Commented] (METRON-764) DST bug in metron-profiler-client Unit Tests

    [ https://issues.apache.org/jira/browse/METRON-764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15924961#comment-15924961 ] 

Matt Foley commented on METRON-764:
-----------------------------------

Stack dumps from junit are:
{code}
Running org.apache.metron.profiler.client.window.WindowProcessorTest
Tests run: 17, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.269 sec <<< FAILURE! - in org.apache.metron.profiler.client.window.WindowProcessorTest
testRepeatWithWeekendExclusion(org.apache.metron.profiler.client.window.WindowProcessorTest)  Time elapsed: 0.005 sec  <<< FAILURE!
java.lang.AssertionError: expected:<5> but was:<6>
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.failNotEquals(Assert.java:834)
	at org.junit.Assert.assertEquals(Assert.java:645)
	at org.junit.Assert.assertEquals(Assert.java:631)
	at org.apache.metron.profiler.client.window.WindowProcessorTest.testRepeatWithWeekendExclusion(WindowProcessorTest.java:175)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)

testRepeatWithWeekdayExclusion(org.apache.metron.profiler.client.window.WindowProcessorTest)  Time elapsed: 0.002 sec  <<< FAILURE!
java.lang.AssertionError: expected:<2> but was:<1>
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.failNotEquals(Assert.java:834)
	at org.junit.Assert.assertEquals(Assert.java:645)
	at org.junit.Assert.assertEquals(Assert.java:631)
	at org.apache.metron.profiler.client.window.WindowProcessorTest.testRepeatWithWeekdayExclusion(WindowProcessorTest.java:212)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)

Results :

Failed tests: 
  WindowProcessorTest.testRepeatWithWeekdayExclusion:212 expected:<2> but was:<1>
  WindowProcessorTest.testRepeatWithWeekendExclusion:175 expected:<5> but was:<6>

Tests run: 41, Failures: 2, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] metron-profiler-client ............................. FAILURE [ 51.770 s]
[INFO] ...
{code}

> DST bug in metron-profiler-client Unit Tests
> --------------------------------------------
>
>                 Key: METRON-764
>                 URL: https://issues.apache.org/jira/browse/METRON-764
>             Project: Metron
>          Issue Type: Bug
>            Reporter: Matt Foley
>            Priority: Critical
>
> There is a Daylight Savings Time bug in the Unit Tests for metron-profiler-client.  Here's how to repro:
> * On a Mac, during daytime, clone Metron and build master branch, including unit tests to confirm they work okay:
> ** mvn clean install
> * Now go into System Preferences, select "Date & Time", select left-most tab (also labeled "Date & Time"), and click the lock icon in the lower left to unlock the time settings.
> * Deselect the "set automatically" checkbox, then set the time and date to approximately 12:30AM on 3/14/2017, your local timezone.
> * Click save and lock.
> * Now run the unit tests just for metron-profiler-client:
> ** mvn install -rf :metron-profiler-client
> * They fail with:
> {code}
> Failed tests: 
>   WindowProcessorTest.testRepeatWithWeekdayExclusion:212 expected:<2> but was:<1>
>   WindowProcessorTest.testRepeatWithWeekendExclusion:175 expected:<5> but was:<6>
> Tests run: 41, Failures: 2, Errors: 0, Skipped: 0
> {code}
> * Reverse the clock settings to get back to actual time with automatic settings.
> * Run "mvn install -rf :metron-profiler-client" again and it passes.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)