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

Fix failing specs #11808

Merged
merged 1 commit into from
Feb 1, 2024
Merged

Fix failing specs #11808

merged 1 commit into from
Feb 1, 2024

Conversation

jjhembd
Copy link
Contributor

@jjhembd jjhembd commented Feb 1, 2024

Description

This PR fixes two failing specs:

1) renders with distance display condition per instance attribute
     Scene/GroundPolylinePrimitive
     Expected (0, 4) to be undefined.
    at <Jasmine>
    at packages/engine/Specs/Scene/GroundPolylinePrimitiveSpec.js:761:58 <- Build/Specs/SpecList.js:175807:58
    at compare (Specs/addDefaultMatchers.js:314:13 <- Build/Specs/karma-main.js:296:13)
    at <Jasmine>

2) renders a model in fog (sunlight)
     Scene/Model/Model fog
     Expected Uint8Array [ 0, 0, 0, 255 ] not to equal [ 0, 0, 0, 255 ].
    at <Jasmine>
    at packages/engine/Specs/Scene/Model/ModelSpec.js:4680:28 <- Build/Specs/SpecList.js:260288:28
    at compare (Specs/addDefaultMatchers.js:314:13 <- Build/Specs/karma-main.js:296:13)
    at <Jasmine>

The GroundPolylinePrimitive spec is a fragile test that was broken by new terrain heights. See #11807.

The Model spec failure was caused by an unrealistic expectation in the initial test suite from #11744. The assumption was that when the sun is on the opposite side of the earth, the model will appear dark but not exactly black. However, in a spec canvas it does sometimes render as fully black.
The remaining expectations in this spec are sufficient, so I simply deleted the unreliable one.

Testing plan

Verify GroundPolylinePrimitiveSpec and ModelSpec run through locally without errors (CI didn't catch the problems).

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • [ ] I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • [ ] I have update the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

Copy link
Contributor

@jjspace jjspace left a comment

Choose a reason for hiding this comment

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

LGTM

@jjspace jjspace merged commit 1dd2829 into main Feb 1, 2024
9 checks passed
@jjspace jjspace deleted the spec-fixes branch February 1, 2024 19:08
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