royitaqi / HollowKnight.BossAttacks

4 stars 1 forks source link

Testing: Make log verifiers to either follow a shared pointer in the LinkedList or start their own private pointer #28

Closed royitaqi closed 1 year ago

royitaqi commented 1 year ago

The shared pointer is so that a 2nd verifier won't miss any log between what the last verifier has looked at and where the 2nd verifier started.

See the log below:

Repro: 5695017f22691d7f55229dcbcd843cfa117391d7

[INFO]:[BossAttacks] - >>TestGruzMother.very module unload<< 20:24:15.684 [F] [PrintStates | 0] Boss entering state Super Choose SCP
[INFO]:[BossAttacks] - >>TestGruzMother.very module unload<< 20:24:15.691 [F] [PrintStates | 0] Boss entering state Super Choose
[INFO]:[BossAttacks] - >>TestGruzMother.very module unload<< 20:24:15.691 [F] [PrintStates | 0] Boss entering state Super Choose SCP
[INFO]:[BossAttacks] - >>TestGruzMother.very module unload<< 20:24:15.696 [F] [PrintStates | 0] Boss entering state Super Choose
[INFO]:[BossAttacks] - >>TestGruzMother.very module unload<< 20:24:15.697 [F] [PrintStates | 0] Boss entering state Super Choose SCP
[INFO]:[BossAttacks] - >>TestGruzMother.very module unload<< 20:24:15.913 [I] [BossAttacks] SceneManager_OnActiveSceneChanged: GG_Gruz_Mother -> GG_Workshop
[INFO]:[BossAttacks] - >>TestGruzMother.very module unload<< 20:24:15.913 [I] [ModuleManager] Unload
[INFO]:[BossAttacks] - >>TestGruzMother.very module unload<< 20:24:15.917 [I] [PrintStates | 0] Unloading
[INFO]:[BossAttacks] - >>TestGruzMother.very module unload<< 20:24:15.918 [I] [VariableSetter | 0] Unloading
[INFO]:[BossAttacks] - >>TestGruzMother.very module unload<< 20:24:15.919 [I] [AttackSelector | 0] Unloading
[INFO]:[BossAttacks] - >>TestGruzMother.very module unload<< 20:24:15.919 [D] [AttackSelector | 0] Turning attack CHARGE to ON (Super Choose.CHARGE -> Charge Antic)
[INFO]:[BossAttacks] - >>TestGruzMother.very module unload<< 20:24:15.919 [D] [BossAttacks] Updating option display
[INFO]:[BossAttacks] - >>TestGruzMother.very module unload<< 20:24:15.919 [D] [AttackSelector | 0] Turning attack SLAM to ON (Super Choose.SLAM -> Slam Antic)
[INFO]:[BossAttacks] - >>TestGruzMother.very module unload<< 20:24:15.919 [D] [BossAttacks] Updating option display
[INFO]:[BossAttacks] - >>TestGruzMother.very module unload<< 20:24:16.324 [T] [TestGruzMother] [#6] Found expected content "[ModuleManager] Unload" in log "20:24:15.913 [I] [ModuleManager] Unload". Good.
[INFO]:[BossAttacks] - >>TestGruzMother.very module unload<< 20:24:16.324 [T] [TestGruzMother] [#7] ExpectLog(content = "[BossAttacks] Updating option display", timeoutSeconds = 2)
[INFO]:[BossAttacks] - >>TestGruzMother.very module unload<< 20:24:18.257 [E] [ModAssert] [#7] TEST FAILED: Cannot find content "[BossAttacks] Updating option display" in logs
[ERROR]:[UNITY] - ModException: [#7] TEST FAILED: Cannot find content "[BossAttacks] Updating option display" in logs
[ERROR]:[UNITY] - BossAttacks.Utils.LoggingUtils.LogModError[T] (T self, System.String message) (at D:/GitHubRepositories/HollowKnight.BossAttacks/BossAttacks/Utils/LoggingUtils.cs:31)
[ERROR]:[UNITY] - BossAttacks.Utils.ModAssert.AllBuilds (System.Boolean condition, System.String message) (at D:/GitHubRepositories/HollowKnight.BossAttacks/BossAttacks/Utils/DevUtils.cs:45)
[ERROR]:[UNITY] - BossAttacks.Utils.E2eTest+<ExpectLog>d__18.MoveNext () (at D:/GitHubRepositories/HollowKnight.BossAttacks/BossAttacks/Utils/E2eTestUtils.cs:215)
[ERROR]:[UNITY] - UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <047294ce45cf4b9a9441e48d2b8435e4>:0)
[ERROR]:[UNITY] - 
[INFO]:[BossAttacks] - >>TestGruzMother.very module unload<< 20:24:18.360 [E] [ModAssert] [#0] TEST FAILED: Unexpected content "[E]" found in log "20:24:18.257 [E] [ModAssert] [#7] TEST FAILED: Cannot find content "[BossAttacks] Updating option display" in logs"
[ERROR]:[UNITY] - ModException: [#0] TEST FAILED: Unexpected content "[E]" found in log "20:24:18.257 [E] [ModAssert] [#7] TEST FAILED: Cannot find content "[BossAttacks] Updating option display" in logs"
[ERROR]:[UNITY] - BossAttacks.Utils.LoggingUtils.LogModError[T] (T self, System.String message) (at D:/GitHubRepositories/HollowKnight.BossAttacks/BossAttacks/Utils/LoggingUtils.cs:31)
[ERROR]:[UNITY] - BossAttacks.Utils.ModAssert.AllBuilds (System.Boolean condition, System.String message) (at D:/GitHubRepositories/HollowKnight.BossAttacks/BossAttacks/Utils/DevUtils.cs:45)
[ERROR]:[UNITY] - BossAttacks.Utils.E2eTest+<ExpectNotLog>d__19.MoveNext () (at D:/GitHubRepositories/HollowKnight.BossAttacks/BossAttacks/Utils/E2eTestUtils.cs:237)
[ERROR]:[UNITY] - UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <047294ce45cf4b9a9441e48d2b8435e4>:0)
[ERROR]:[UNITY] - 
royitaqi commented 1 year ago

Implemented in 054825655652b73c4de86deddbb565b4a699f242