Page MenuHomeWildfire Games

Tests for D1879 - Fix limit restriction for training units in ProductionQueue
AbandonedPublic

Authored by wraitii on Jun 15 2019, 2:52 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

D1879 fixes a subtle issue with the production queue.
This adds a regression test for that.

(sadly over 120 lines long as there is just so much to mock here...)

Test Plan

Notice that the tests will fail on SVN. Apply D1879, noticed that tests pass.

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
temp
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 7933
Build 12912: Vulcan BuildJenkins
Build 12911: arc lint + arc unit

Unit TestsFailed

TimeTest
0 msJenkins > TestComponentScripts::test_scripts
Test failed: Stack trace: regression_test_d1879@simulation/components/tests/test_ProductionQueue.js:280:2 @simulation/components/tests/test_ProductionQueue.js:283:1
0 msJenkins > TestAllocators::test_da
0 msJenkins > TestAllocators::test_da
0 msJenkins > TestAtlasObjectXML::test_parse_attributes1
0 msJenkins > TestAtlasObjectXML::test_parse_attributes1
View Full Test Results (1 Failed · 643 Passed)

Event Timeline

wraitii created this revision.Jun 15 2019, 2:52 PM
wraitii added inline comments.
binaries/data/mods/public/simulation/components/tests/test_ProductionQueue.js
166

I'm copying a bunch of code from above - if it gets removed, the tests still work.

271

Guess this should be rephrased

Build failure - The Moirai have given mortals hearts that can endure.

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 8 spaces.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ProductionQueue.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ProductionQueue.js
|   1|   1| Resources = {
|   2|    |-        "BuildSchema": (a, b) => {}
|    |   2|+	"BuildSchema": (a, b) => {}
|   3|   3| };
|   4|   4| 
|   5|   5| Engine.LoadHelperScript("Player.js");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 67 spaces.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ProductionQueue.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ProductionQueue.js
| 120| 120| 	["units/athen_cavalry_javelinist_b", "units/iber_support_female_citizen"]
| 121| 121| );
| 122| 122| TS_ASSERT_UNEVAL_EQUALS(cmpProductionQueue.GetTechnologiesList(), ["phase_town_athen",
| 123|    |-                                                                   "phase_city_athen"]
|    | 123|+	"phase_city_athen"]
| 124| 124| );
| 125| 125| 
| 126| 126| AddMock(playerEntityID, IID_TechnologyManager, {
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/differential/1720/display/redirect

wraitii added a subscriber: Itms.Jun 15 2019, 7:30 PM

Thought I could close a revision, but apparently not. @Itms ?
This was committed alongside D1879 in rP22375

Stan added a subscriber: Stan.Jun 15 2019, 11:44 PM
Stan added inline comments.
binaries/data/mods/public/simulation/components/tests/test_ProductionQueue.js
271

Spawn point shouldn't get updated when spawn fails ?

@Itms Can you close a revision or should I abandon this?

Angen abandoned this revision.Sun, Jun 30, 8:14 PM
Angen removed a reviewer: Angen.Sun, Jun 30, 8:17 PM