Skip to content

Updates to reset progress on mc lesson before testing certificate. - #51308

Merged
wilkie merged 1 commit into
stagingfrom
p20-fix-hour-of-code-finish-flaky-test
Apr 24, 2023
Merged

Updates to reset progress on mc lesson before testing certificate.#51308
wilkie merged 1 commit into
stagingfrom
p20-fix-hour-of-code-finish-flaky-test

Conversation

@wilkie

@wilkie wilkie commented Apr 12, 2023

Copy link
Copy Markdown
Contributor

This should fix the flaky test which sometimes races other tests to generate a certificate. Without resetting, a cached certificate is used. In general, this may be a bug with certificate generation since even in production the cached certificate is used even if a student enters a new name.

There may be reasons for this behavior, however. These additional steps preceding the normal test will work in the presence of this caching behavior and still work if there is no cached certificate. We are not trying to correct that behavior, just handle it in a way that still works if somebody does correct it later.

Warning!!

The AP CSP Create Performance Task is in progress from April 1 - May 1 2023. Please
consider any risk introduced by this PR that could affect our students taking AP CSP. Code.org
students taking AP CSP primarily use App Lab for their Create Task, however a small percent use Game
Lab. Carefully consider whether your change has any risk of alterering, changing, or breaking
anything in these two labs. Even small changes, such as a different button color, are considered
significant during this time period. Reach out to the Student Learning team or Curriculum team for
more details.

Links

Testing story

Ran the test suite a few times to see if it would have a flaky failure.

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

This should fix the flaky test which sometimes races other tests to
generate a certificate. Without resetting, a cached certificate is used.
In general, this may be a bug with certificate generation since even in
production the cached certificate is used even if a student enters a new
name.

There may be reasons for this behavior, however. These additional
steps preceding the normal test will work in the presence of this
caching behavior and still work if there is no cached certificate.
@wilkie
wilkie marked this pull request as ready for review April 20, 2023 15:58

@mgc1194 mgc1194 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. I agree there may be a bug with the cache. There are some other bugs related to certificate, so I appreciate that the test will still be relevant and working when changes are made.

@wilkie
wilkie merged commit 6b97926 into staging Apr 24, 2023
@wilkie
wilkie deleted the p20-fix-hour-of-code-finish-flaky-test branch April 24, 2023 18:20
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.

2 participants