New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reply parser was not honouring replies with multiple items #4965

Merged
merged 1 commit into from Feb 26, 2018

Conversation

Projects
None yet
1 participant
@mattharris
Member

mattharris commented Feb 26, 2018

ECoS state machine is updated on replies from the command station.

The response parser was only considering single item responses.

As a result of the change introduced in #4945 we now generate messages containing multiple items (speed and dir).

This PR fixes the reply parser to correctly update the state machine from such messages. Without this change, only speed was being updated by these multi-item responses.

In addition, there is some clean-up of unnecessary Float boxing and additions to some missing JavaDoc - both highlighted by NetBeans.

Reply parser was not honouring replies with multiple items (speed and…
… dir).

Also clean-up some unnecessary Float boxing highlighted by NetBeans and add some missing JavaDoc.

@mattharris mattharris added the Bug label Feb 26, 2018

@mattharris mattharris added this to the 4.11.4 milestone Feb 26, 2018

@mattharris mattharris self-assigned this Feb 26, 2018

@mattharris

This comment has been minimized.

Member

mattharris commented Feb 26, 2018

Travis headless failed due to:

[ERROR] Tests run: 96, Failures: 0, Errors: 1, Skipped: 1, Time elapsed: 207.011 s <<< FAILURE! - in jmri.jmrit.display.layoutEditor.LayoutEditorTest
[ERROR] testSetHighlightSelectedBlockFalse(jmri.jmrit.display.layoutEditor.LayoutEditorTest)  Time elapsed: 180.219 s  <<< ERROR!
org.netbeans.jemmy.TimeoutExpiredException: Wait event queue staying empty for 100 (QueueTool.WaitQueueEmptyTimeout)
	at org.netbeans.jemmy.Waiter.waitAction(Waiter.java:213)
	at org.netbeans.jemmy.QueueTool.waitEmpty(QueueTool.java:294)
	at jmri.jmrit.display.layoutEditor.LayoutEditorTest.testSetHighlightSelectedBlockFalse(LayoutEditorTest.java:720)
	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:498)
	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.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	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:365)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:272)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:236)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:386)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:323)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:143)

Restarted.

@mattharris mattharris merged commit bcf1c0c into JMRI:master Feb 26, 2018

4 checks passed

WIP ready for review
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.01%) to 40.716%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment