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

Global history testing #2485

Open
aadcg opened this issue Aug 1, 2022 · 3 comments
Open

Global history testing #2485

aadcg opened this issue Aug 1, 2022 · 3 comments
Labels
bug low test Testing and benchmarking.

Comments

@aadcg
Copy link
Member

aadcg commented Aug 1, 2022

In d32b369 a change was introduced to deal with that fact that running these tests locally always failed. However, running the test suite twice locally results in the same problem.

Steps to reproduce:

  • (asdf:load-system "nyxt/tests")
  • (in-package :nyxt/tests)
  • (dotimes (_ 2) (with-summary () (run-test 'global-history)))
NYXT/TESTS> (dotimes (_ 2) (with-summary () (run-test 'global-history)))


Starting: NYXT/TESTS::GLOBAL-HISTORY
 <INFO> [15:31:05] nyxt user-files.lisp (read-file :around nyxt-profile nyxt-file) -
  Loading #P"/home/aadcg/.local/share/test/history/default.lisp".
NYXT/TESTS::GLOBAL-HISTORY - PASSED (0.76s) : 7 assertions passed


Starting: NYXT/TESTS::GLOBAL-HISTORY
NYXT/TESTS::GLOBAL-HISTORY - FAILED (0.59s) : 2 assertions passed
  | FAILED (5)
  | Failed Form: (ASSERT-EQ 1
  |                         (LENGTH
  |                          (HISTORY-TREE:ALL-DATA (FILES:CONTENT FILE))))
  | Expected 1
  | but saw 2
  | Failed Form: (ASSERT-EQUALITY #'QURI:URI=
  |                               (QURI.URI:URI "http://example.org")
  |                               (URL ENTRY))
  | Expected #<QURI.URI.HTTP:URI-HTTP http://example.org>
  | but saw #<QURI.URI.HTTP:URI-HTTP http://example.org/sub>
  | Failed Form: (ASSERT-EQ 1
  |                         (LENGTH
  |                          (HISTORY-TREE:ALL-DATA (FILES:CONTENT FILE))))
  | Expected 1
  | but saw 2
  | Failed Form: (ASSERT-EQ 2
  |                         (IMPLICIT-VISITS
  |                          (FIRST
  |                           (HISTORY-TREE:ALL-DATA (FILES:CONTENT FILE)))))
  | Expected 2
  | but saw 1
  | Failed Form: (ASSERT-STRING= "foo" (TITLE ENTRY))
  | Expected "foo"
  | but saw ""
  |
  | 
NIL
@aadcg aadcg added bug low test Testing and benchmarking. labels Aug 1, 2022
@Ambrevar
Copy link
Member

Ambrevar commented Aug 3, 2022

It's a different problem but yes, the test is not functional enough then! Thanks for catching this, André!

Should we have a meta-test that runs the tests twice?

@aadcg
Copy link
Member Author

aadcg commented Aug 3, 2022

Should we have a meta-test that runs the tests twice?

I don't think so honestly. We'd be leaning towards a (potentially) endless chain of meta testing that goes by: program -> test(program) -> test(test(program)) -> ...

We just need to be extremely careful so that our test suite is as bug-free as we can. It's ok it's not perfect yet :)

@Ambrevar
Copy link
Member

Ambrevar commented Sep 13, 2022

@aadcg Is this fixed? Wrong issue, sorry :p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug low test Testing and benchmarking.
Development

No branches or pull requests

2 participants