Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

pq: duplicate key value violates unique constraint #1644

Closed
kwk opened this issue Sep 18, 2017 · 4 comments
Closed

pq: duplicate key value violates unique constraint #1644

kwk opened this issue Sep 18, 2017 · 4 comments
Assignees

Comments

@kwk
Copy link
Collaborator

kwk commented Sep 18, 2017

It is about my 3rd time or more that I ran into this kind of error with Jenkins:

--- FAIL: TestConvertGithubIssue (0.03s)
    assertions.go:241: 
                        
    Error Trace:    trackeritem_repository_test.go:302
        
    Error:        Expected nil, but got: failed to create work item: pq: duplicate key value violates unique constraint "work_item_number_sequences_pkey"

It is not always this test in particular but the message is almost always the same.

I have to trigger a build with a [test] comment and then the error disappears.

It is hard to reproduce what causes this test error.

@kwk kwk added the 💣 test label Sep 18, 2017
@kwk kwk assigned xcoulon and kwk Sep 18, 2017
@kwk
Copy link
Collaborator Author

kwk commented Sep 21, 2017

New occurrence:

--- FAIL: TestConvertNewWorkItemWithUnknownIdentities (0.03s)
	assertions.go:241: 
                        
	Error Trace:	trackeritem_repository_test.go:147
		
	Error:		Expected nil, but got: failed to create work item: pq: duplicate key value violates unique constraint "work_item_number_sequences_pkey"

See here https://ci.centos.org/job/devtools-fabric8-wit/877/consoleFull

@aslakknutsen
Copy link
Contributor

most likely there is yet another test that doesn't clean up the db after it self

@kwk
Copy link
Collaborator Author

kwk commented Sep 22, 2017

most likely there is yet another test that doesn't clean up the db after it self

I hope to find that during a refactoring.

@xcoulon
Copy link
Contributor

xcoulon commented Oct 19, 2017

Closing this issue for now, since #1677 was merged (f150285).
Please reopen if the error occurs again.

@xcoulon xcoulon closed this as completed Oct 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants