convert to using postgres #6

Closed
opened 2016-06-07 15:02:55 -07:00 by dm · 3 comments
Collaborator

Tests will sometimes fail. Easy way to reproduce is run tests in a loop, for example:

for i in {1..100}; do go test -run RoundTrip; done;

With ~10% fail rate, you should see:

--- FAIL: TestRoundTrip (0.09s)
api_test.go:666: pkgs should have something in it; got 0, want 1

Tests will sometimes fail. Easy way to reproduce is run tests in a loop, for example: for i in {1..100}; do go test -run RoundTrip; done; With ~10% fail rate, you should see: --- FAIL: TestRoundTrip (0.09s) api_test.go:666: pkgs should have something in it; got 0, want 1
Owner

Here's good way to test that this has been solved (aside from making a test that reproduces this pathology, which we haven't done yet):

$ go test -c mcquay.me/vain
$ for i in {1..100}; do ./vain.test -test.Run RoundTrip; done

This gets around the overhead of compilation for every test as it compiles it once.

Here's good way to test that this has been solved (aside from making a test that reproduces this pathology, which we haven't done yet): $ go test -c mcquay.me/vain $ for i in {1..100}; do ./vain.test -test.Run RoundTrip; done This gets around the overhead of compilation for every test as it compiles it once.
Owner

It's not sqlite:

--- FAIL: TestRoundTrip (0.48s)
    api_test.go:681: unable to add package: pq: insert or update on table "packages" violates foreign key constraint "packages_ns_fkey"
    api_test.go:682: bad request got incorrect status: got 500, want 200
FAIL
It's not sqlite: --- FAIL: TestRoundTrip (0.48s) api_test.go:681: unable to add package: pq: insert or update on table "packages" violates foreign key constraint "packages_ns_fkey" api_test.go:682: bad request got incorrect status: got 500, want 200 FAIL
Owner

https://grt.mcquay.me/#/c/9/

but I am starting to think it should just be in-memory and written to disk periodically.

https://grt.mcquay.me/#/c/9/ but I am starting to think it *should* just be in-memory and written to disk periodically.
sm closed this issue 2016-06-21 23:49:02 -07:00
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sm/vain#6
No description provided.