Skip to content
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

Unit Test Failure in GrbControllerTest #183

Closed
droidmunkey opened this issue Aug 15, 2014 · 7 comments
Closed

Unit Test Failure in GrbControllerTest #183

droidmunkey opened this issue Aug 15, 2014 · 7 comments

Comments

@droidmunkey
Copy link

Ok, perhaps this is why it is failing-

[junit] Testcase: testPolling(com.willwinder.universalgcodesender.GrblControllerTest):      FAILED
[junit] expected:<1> but was:<0>
[junit] junit.framework.AssertionFailedError: expected:<1> but was:<0>
[junit]     at com.willwinder.universalgcodesender.GrblControllerTest.testPolling(GrblControllerTest.java:925)
[junit] 
[junit] 
[junit] Testcase: testCancelSend(com.willwinder.universalgcodesender.GrblControllerTest):   FAILED
[junit] expected:<0> but was:<30>
[junit] junit.framework.AssertionFailedError: expected:<0> but was:<30>
[junit]     at com.willwinder.universalgcodesender.GrblControllerTest.testCancelSend(GrblControllerTest.java:735)
[junit] 
[junit] 
[junit] Test com.willwinder.universalgcodesender.GrblControllerTest FAILED
@droidmunkey
Copy link
Author

Here is the full output up to the UIPendant Tests

-do-test-run:
[junit] Testsuite: com.willwinder.universalgcodesender.CommUtilsTest
[junit] checkRoomInBuffer
[junit] getSizeOfBuffer
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.295 sec
[junit]
[junit] ------------- Standard Output ---------------
[junit] checkRoomInBuffer
[junit] getSizeOfBuffer
[junit] ------------- ---------------- ---------------
[junit] Testsuite: com.willwinder.universalgcodesender.GcodePreprocessorUtilsTest
[junit] removeAllWhitespace
[junit] parseCodes
[junit] overrideSpeed
[junit] removeComment
[junit] parseComment
[junit] truncateDecimals
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.331 sec
[junit]
[junit] ------------- Standard Output ---------------
[junit] removeAllWhitespace
[junit] parseCodes
[junit] overrideSpeed
[junit] removeComment
[junit] parseComment
[junit] truncateDecimals
[junit] ------------- ---------------- ---------------
[junit] Testsuite: com.willwinder.universalgcodesender.GrblCommunicatorTest
[junit] setLineTerminator
[junit] closeCommPort
[junit] -not testing RXTX.
[junit] softReset
[junit] openCommPort
[junit] -not testing RXTX.
[junit] pauseSend
[junit] streamCommands
[junit] areActiveCommands
[junit] cancelSend
[junit] sendByteImmediately
[junit] queueStringForComm
[junit] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.205 sec
[junit]
[junit] ------------- Standard Output ---------------
[junit] setLineTerminator
[junit] closeCommPort
[junit] -not testing RXTX.
[junit] softReset
[junit] openCommPort
[junit] -not testing RXTX.
[junit] pauseSend
[junit] streamCommands
[junit] areActiveCommands
[junit] cancelSend
[junit] sendByteImmediately
[junit] queueStringForComm
[junit] ------------- ---------------- ---------------
[junit] Testsuite: com.willwinder.universalgcodesender.GrblControllerTest
[junit] commandSent
[junit] appendGcodeFile
[junit] rawResponseListener
[junit] closeCommPort/isCommOpen
[junit] isStreamingFile
[junit] commandComplete
[junit] Exception: Attempting to complete a command that doesn't exist: <(-1)>
[junit] openCommPort/isCommOpen
[junit] verboseMessageForConsole
[junit] testRowsAsteriskMethods
[junit] beginStreaming
[junit] messageForConsole
[junit] testPolling (via rawResponseListener)
[junit] preprocessAndAppendGcodeCommand
[junit] resumeStreaming
[junit] addListener
[junit] getSendDuration
[junit] performHomingCycle
[junit] pauseStreaming
[junit] cancelSend
[junit] getGrblVersion
[junit] setSpeedOverride/getSpeedOverride
[junit] issueSoftReset
[junit] isReadyToStreamFile
[junit] queueStringForComm
[junit] Tests run: 24, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 13.936 sec
[junit]
[junit] ------------- Standard Output ---------------
[junit] commandSent
[junit] appendGcodeFile
[junit] rawResponseListener
[junit] closeCommPort/isCommOpen
[junit] isStreamingFile
[junit] commandComplete
[junit] Exception: Attempting to complete a command that doesn't exist: <(-1)>
[junit] openCommPort/isCommOpen
[junit] verboseMessageForConsole
[junit] testRowsAsteriskMethods
[junit] beginStreaming
[junit] messageForConsole
[junit] testPolling (via rawResponseListener)
[junit] preprocessAndAppendGcodeCommand
[junit] resumeStreaming
[junit] addListener
[junit] getSendDuration
[junit] performHomingCycle
[junit] pauseStreaming
[junit] cancelSend
[junit] getGrblVersion
[junit] setSpeedOverride/getSpeedOverride
[junit] issueSoftReset
[junit] isReadyToStreamFile
[junit] queueStringForComm
[junit] ------------- ---------------- ---------------
[junit] Testcase: testCancelSend(com.willwinder.universalgcodesender.GrblControllerTest): FAILED
[junit] expected:< 0 > but was:< 30 >
[junit] junit.framework.AssertionFailedError: expected:< 0 > but was:< 30 >
[junit] at com.willwinder.universalgcodesender.GrblControllerTest.testCancelSend(GrblControllerTest.java:735)
[junit]
[junit]
[junit] Test com.willwinder.universalgcodesender.GrblControllerTest FAILED
[junit] Testsuite: com.willwinder.universalgcodesender.GrblUtilsTest
[junit] getKillAlarmLockCommand
[junit] getVersionDouble
[junit] getVersionLetter
[junit] isGrblStatusString
[junit] getViewParserStateCommand
[junit] getGrblStatusCapabilities
[junit] getWorkPositionFromStatusString
[junit] isRealTimeCapable
[junit] isGrblVersionString
[junit] getResetCoordCommand
[junit] getStateFromStatusString
[junit] getMachinePositionFromStatusString
[junit] getReturnToHomeCommand
[junit] getHomingCommand
[junit] getToggleCheckModeCommand
[junit] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.601 sec
[junit]
[junit] ------------- Standard Output ---------------
[junit] getKillAlarmLockCommand
[junit] getVersionDouble
[junit] getVersionLetter
[junit] isGrblStatusString
[junit] getViewParserStateCommand
[junit] getGrblStatusCapabilities
[junit] getWorkPositionFromStatusString
[junit] isRealTimeCapable
[junit] isGrblVersionString
[junit] getResetCoordCommand
[junit] getStateFromStatusString
[junit] getMachinePositionFromStatusString
[junit] getReturnToHomeCommand
[junit] getHomingCommand
[junit] getToggleCheckModeCommand
[junit] ------------- ---------------- ---------------
[junit] Testsuite: com.willwinder.universalgcodesender.UtilsTest
[junit] formattedMillis
[junit] processFile
[junit] timeSince
[junit] millisSince
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.293 sec
[junit]
[junit] ------------- Standard Output ---------------
[junit] formattedMillis
[junit] processFile
[junit] timeSince
[junit] millisSince

@droidmunkey
Copy link
Author

well it's because rowsRemaining() is returning 30 instead of 0 - i added some debug output to see where the value came from

Should "numCommandsSkipped" be incremented based on the number of commands in the queue when cancelSend() is called? (this.numCommandsSkipped += this.outgoingQueue.size();)

[junit] cancelSend
[junit] cancelSend()- outgoingQueue size before clearing: 30
[junit] rowsRemaining() - numCommandsStreamed: 30
[junit] rowsRemaining() - numCommandsCompleted: 0
[junit] rowsRemaining() - numCommandsSkipped: 0

@winder
Copy link
Owner

winder commented Aug 15, 2014

This test is actually a known failure. Right now "cancel" doesn't clear out
the GRBL buffer even though it should be possible so I left this in as a
reminder.

On Friday, August 15, 2014, droidmunkey notifications@github.com wrote:

well it's because rowsRemaining() is returning 30 instead of 0 - i added
some debug output to see where the value came from

Should "numCommandsSkipped" be incremented based on the number of commands
in the queue when cancelSend() is called? (this.numCommandsSkipped +=
this.outgoingQueue.size();)

[junit] cancelSend
[junit] cancelSend()- outgoingQueue size before clearing: 30
[junit] rowsRemaining() - numCommandsStreamed: 30
[junit] rowsRemaining() - numCommandsCompleted: 0
[junit] rowsRemaining() - numCommandsSkipped: 0


Reply to this email directly or view it on GitHub
#183 (comment)
.

@droidmunkey
Copy link
Author

Ok, so how do i compile the jar file if the tests fail?

I am trying to compile from the command line and these failures prevent the compile process from finishing

@winder
Copy link
Owner

winder commented Aug 16, 2014

I compile the jar from NetBeans, it doesn't run the unit tests. The build
target I use is mentioned in the github read me.

On Friday, August 15, 2014, droidmunkey notifications@github.com wrote:

well it's because rowsRemaining() is returning 30 instead of 0 - i added
some debug output to see where the value came from

Should "numCommandsSkipped" be incremented based on the number of commands
in the queue when cancelSend() is called? (this.numCommandsSkipped +=
this.outgoingQueue.size();)

[junit] cancelSend
[junit] cancelSend()- outgoingQueue size before clearing: 30
[junit] rowsRemaining() - numCommandsStreamed: 30
[junit] rowsRemaining() - numCommandsCompleted: 0
[junit] rowsRemaining() - numCommandsSkipped: 0


Reply to this email directly or view it on GitHub
#183 (comment)
.

@droidmunkey
Copy link
Author

Might want to included that in a "compile guide" - i wasted a bunch of time trying to figure out why the tests were failing.

@winder
Copy link
Owner

winder commented Aug 26, 2014

This should be fixed now.

@winder winder closed this as completed Aug 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants