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

Test OracleService #3475

Merged
merged 5 commits into from
Sep 6, 2024
Merged

Test OracleService #3475

merged 5 commits into from
Sep 6, 2024

Conversation

Hecate2
Copy link
Contributor

@Hecate2 Hecate2 commented Sep 2, 2024

Description

Adding tests

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@Hecate2
Copy link
Contributor Author

Hecate2 commented Sep 2, 2024

For now the new test just "seems" to pass.
At https://github.com/Hecate2/neo/blob/4f4f2ccfafb2d57cb310dd025771715e442c7b6f/tests/Neo.Plugins.OracleService.Tests/E2E_Https.cs#L98
After we call s_oracle.Start, we cannot pass the CheckOracleAvailable at https://github.com/Hecate2/neo/blob/fbb607b31f54921569e71c4abbe764eb6f096240/src/Plugins/OracleService/OracleService.cs#L136 . But in RoleManagement.cs, we do have identical keys built from GetDesignatedByRole and DesignateAsRole (both keys are 248 255 255 255 8 0 0 0 2).
I am still wondering why.

@Hecate2
Copy link
Contributor Author

Hecate2 commented Sep 3, 2024

Now it hits

message = await client.GetAsync(uri, HttpCompletionOption.ResponseContentRead, cancellation);

but never goes to the next line. No exception was thrown (cancellation token timeout has been considered). This may be because the async tasks are never awaited.

@shargon shargon merged commit 2b118b4 into neo-project:master Sep 6, 2024
6 checks passed
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.

4 participants