Skip to content

test: add wait time after DOI creation#363

Merged
yarikoptic merged 1 commit intomasterfrom
wait-for-doi
Jan 22, 2026
Merged

test: add wait time after DOI creation#363
yarikoptic merged 1 commit intomasterfrom
wait-for-doi

Conversation

@candleindark
Copy link
Member

@candleindark candleindark commented Jan 21, 2026

To avoid the behavior of the bug documented at datacite/datacite#2307 so that our test servers are not populated with undeletable DOIs.

This PR implements the first option of the three listed below to address the the behavior of the bug documented at datacite/datacite#2307. If undeletable DOIs continue to occur after this PR is applied. We should consider implementing another option instead.

  1. Insert a waiting period of about 1-2 seconds between the creation and deletion of the same DOI. (This solution is not perfect since a GH Action job that is running such a test can get cancelled just after the creation of a DOI, and a created DOI may not be deleted. However, the situation of a created DOI that is not eventually deleted is unlikely, and this solution ensures that a created DOI can always be deleted. You may just need to delete some of them manually).
  2. Have the tests only create DOIs but not delete them, and run another CI job to delete the DOIs created by the tests periodically. This approach also ensure the created DOIs are deletable. However, those DOIs will remain in the server for a period of time.
  3. Implement option 1 but also a CI job to periodically remove any created DOIs that have not been deleted.

@candleindark candleindark requested a review from Copilot January 21, 2026 05:26
@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.89%. Comparing base (cabfa3d) to head (27383c6).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #363   +/-   ##
=======================================
  Coverage   97.89%   97.89%           
=======================================
  Files          18       18           
  Lines        2377     2379    +2     
=======================================
+ Hits         2327     2329    +2     
  Misses         50       50           
Flag Coverage Δ
unittests 97.89% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a 3-second wait after DOI creation in the test suite to work around a DataCite API bug that can result in undeletable DOIs on test servers.

Changes:

  • Added a sleep(3) call after DOI creation to allow DataCite to properly process the DOI before attempting subsequent operations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

To avoid the behavior of the bug
documented at
datacite/datacite#2307
so that our test servers are not
populated with undeletable DOIs.
@candleindark candleindark added the tests Add or improve existing tests label Jan 21, 2026
@candleindark
Copy link
Member Author

@sandyhider Please let use know if you continue to see undeletable DOIs continue to be created after this PR is applied.

@candleindark candleindark marked this pull request as ready for review January 21, 2026 05:54
@yarikoptic
Copy link
Member

let's see if helps?!

@yarikoptic yarikoptic merged commit be7d361 into master Jan 22, 2026
73 checks passed
@yarikoptic yarikoptic deleted the wait-for-doi branch January 22, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Add or improve existing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants