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

Fix networkinterface non-blocking status test #10761

Merged
merged 1 commit into from
Jun 9, 2019

Conversation

jarvte
Copy link
Contributor

@jarvte jarvte commented Jun 5, 2019

Description

Fix was to add some time between iterations connect-disconnect. In cellular disconnect, cellular network may send disconnect events and if those events come when connect is already ongoing test will fail.
So wait a bit after disconnect so that disconnect events should be over.

Pull request type

[ ] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[x] Test update
[ ] Breaking change

Reviewers

@AriParkkila

Release Notes

@ciarmcom ciarmcom requested review from AriParkkila and a team June 5, 2019 13:00
@ciarmcom
Copy link
Member

ciarmcom commented Jun 5, 2019

@jarvte, thank you for your changes.
@AriParkkila @ARMmbed/mbed-os-test @ARMmbed/mbed-os-ipcore @ARMmbed/mbed-os-maintainers please review.

@michalpasztamobica
Copy link
Contributor

I don't fully understand why would extra disconnect messages be sent to callback if the socket has already been disconnected? Maybe it is better to prevent them being sent? The test seems to be well tailored...

In case there is a good reason to keep sending messages to callback after socket got disconnected... Do we know how many messages are expected? Perhaps we can consciously receive them, to make sure nothing will spuriously break the subsequent connect()?

Is only this one particular test affected or do other tests also need to wait for pending messages to arrive?

@SeppoTakalo
Copy link
Contributor

I don't fully understand why would extra disconnect messages be sent to callback if the socket has already been disconnected?

Not socket.. this is for NetworkInterface.

And in theory, you cannot destroy interface, but you can destroy socket.
Therefore disconnected interface may still keep posting events. Some are generic "disconnected" some may be cellular specific.

Fix was to add some time between iterations connect-disconnect.
In cellular disconnect, cellular network may send disconnect events
and if those events come when connect is already ongoing test will fail.
So wait a bit after disconnect so that disconnect events should be over.
@jarvte jarvte force-pushed the fix_nwinterface_statustest branch from 4bd4f46 to 2b9e1f3 Compare June 6, 2019 06:05
@jarvte
Copy link
Contributor Author

jarvte commented Jun 6, 2019

Force-pushed astyle fixes

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 7, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Jun 7, 2019

Test run: SUCCESS

Summary: 4 of 4 test jobs passed
Build number : 1
Build artifacts

@0xc0170 0xc0170 merged commit 3c2dd9c into ARMmbed:master Jun 9, 2019
@jarvte jarvte deleted the fix_nwinterface_statustest branch June 12, 2019 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants