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

remove goroutine from a test (close #347) #353

Merged
merged 5 commits into from
Nov 8, 2021
Merged

remove goroutine from a test (close #347) #353

merged 5 commits into from
Nov 8, 2021

Conversation

samutamm
Copy link
Contributor

@samutamm samutamm commented Nov 4, 2021

Fix #347.

There was nondeterministic issue with http.Server creation and closing and sending messages.

  • Changing topicsPublish invocations from concurrent goroutines to sequential invocations to avoid race condition
  • Modify mqtt_test.go's testServer.start() to wait until the server is ready

To verify that test fails 0/30 runs :

cd pkg/object/mqttproxy 
for (( i=0; i < 30; i=i+1 )); do go test | tail -n 1 | cut -c 1-4; done

and output should have only ok's.

Todo

I found new error that should be investigated
--- FAIL: TestCleanSession (0.00s) mqtt_test.go:231: topicMgr should contain topic test/cleanSession/0 when client reconnect, but got map[]

Copy link

@megaeasex megaeasex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[TASK:easegress-pr-test SUCCESS]megaease/easegress Pull Request 353 Deploy Test Success

Copy link

@megaeasex megaeasex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[TASK:easegress-pr-test SUCCESS]megaease/easegress Pull Request 353 Deploy Test Success

Copy link

@megaeasex megaeasex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[TASK:easegress-pr-test SUCCESS]megaease/easegress Pull Request 353 Deploy Test Success

Copy link

@megaeasex megaeasex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[TASK:easegress-pr-test SUCCESS]megaease/easegress Pull Request 353 Deploy Test Success

Copy link

@megaeasex megaeasex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[TASK:easegress-pr-test SUCCESS]megaease/easegress Pull Request 353 Deploy Test Success

@codecov-commenter
Copy link

Codecov Report

Merging #353 (e815c15) into main (23329d3) will decrease coverage by 0.09%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #353      +/-   ##
==========================================
- Coverage   80.58%   80.48%   -0.10%     
==========================================
  Files          54       54              
  Lines        6217     6217              
==========================================
- Hits         5010     5004       -6     
- Misses        942      947       +5     
- Partials      265      266       +1     
Impacted Files Coverage Δ
pkg/cluster/cluster.go 48.76% <0.00%> (-1.06%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 698c271...e815c15. Read the comment docs.

Copy link

@megaeasex megaeasex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[TASK:easegress-pr-test SUCCESS]megaease/easegress Pull Request 353 Deploy Test Success

@localvar localvar merged commit 1afeb8f into main Nov 8, 2021
zhao-kun pushed a commit that referenced this pull request Nov 8, 2021
* remove goroutine from a test (close #347)

* modify http.Server.start() in mqtt_test to wait until ready

* Update pkg/object/mqttproxy/mqtt_test.go

Co-authored-by: Bomin Zhang <[email protected]>

* Fix typo in url address

Co-authored-by: SU Chen <[email protected]>

* fix formatting

Co-authored-by: Bomin Zhang <[email protected]>
Co-authored-by: SU Chen <[email protected]>
@samutamm samutamm deleted the fix/issue-347 branch December 6, 2021 01:59
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

Successfully merging this pull request may close these issues.

MQTT test case fails randomly
5 participants