Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

test: go routine errata #4233

Merged
merged 1 commit into from
Feb 5, 2021
Merged

Conversation

jackfrancis
Copy link
Member

Reason for Change:

Whoops we were using the wrong select/case pattern to handle continual async message passing for a few go routines used by the E2E test runner. Specifically, we're doing a "run a command once then sleep" pattern, which in the context of a select/case that also handles messages from async channels means that after we return from sleep we want to process any messages first (because those messages tell us whether or not we need to actually re-run the command again).

The fix is to put the periodic command invocation in the default block, so that we will always "fall through" the case statements (order not guaranteed). In this case the only order we care about is invoking the command last, so doing it inside of default accomplishes that.

Issue Fixed:

Credit Where Due:

Does this change contain code from or inspired by another project?

  • No
  • Yes

If "Yes," did you notify that project's maintainers and provide attribution?

  • No
  • Yes

Requirements:

Notes:

@acs-bot
Copy link

acs-bot commented Feb 5, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jackfrancis

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codecov
Copy link

codecov bot commented Feb 5, 2021

Codecov Report

Merging #4233 (5d8c81c) into master (f5836e0) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4233   +/-   ##
=======================================
  Coverage   72.07%   72.07%           
=======================================
  Files         141      141           
  Lines       21698    21698           
=======================================
  Hits        15638    15638           
  Misses       5103     5103           
  Partials      957      957           

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 f5836e0...5d8c81c. Read the comment docs.

@jackfrancis jackfrancis merged commit eeac22c into Azure:master Feb 5, 2021
@jackfrancis jackfrancis deleted the e2e-close-channels branch February 5, 2021 17:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants