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

Bug: pg has random tag-related test failures #2075

Closed
ErisDS opened this Issue Jan 29, 2014 · 6 comments

Comments

Projects
None yet
3 participants
@ErisDS
Member

ErisDS commented Jan 29, 2014

Issue Summary

The pg build frequently but inconsistently fails the following test:

Tag Model a Post setting tags from an array on update attaches one tag that exists in the Tags database and two tags that are new to the Tags database:
+ expected - actual
+4
-5

full gist here

which is really weird. It also regularly fails with:

  1. Settings Model API can read:
    TypeError: Cannot read property 'should' of null

Also shown in the same gist.

Steps to Reproduce

Unknown - trigger a few builds, one is bound to fail!

Technical details:

  • Ghost Version: 0.4

@ErisDS ErisDS modified the milestones: 0.5, Future Feb 19, 2014

@ErisDS

This comment has been minimized.

Member

ErisDS commented Feb 19, 2014

I believe this will be fixed by #2169

@sebgie

This comment has been minimized.

Contributor

sebgie commented Feb 19, 2014

no, sorry not fixed yet :-(

@ErisDS

This comment has been minimized.

Member

ErisDS commented Feb 22, 2014

Ah no worries, I thought you might have caught it with your work.

@halfdan

This comment has been minimized.

Member

halfdan commented Mar 16, 2014

We recently seem to have a new pg error:

�[0m  1) Post Model can fetch a paginated set, with various options:
�[0m�[31m     AssertionError: expected 11 to equal 9�[0m�[90m
      at Object.Assertion.equal (/home/travis/build/TryGhost/Ghost/node_modules/should/lib/should.js:389:10)
      at /home/travis/build/TryGhost/Ghost/core/test/integration/model/model_posts_spec.js:422:50
      at NearFulfilledProxy.when (/home/travis/build/TryGhost/Ghost/node_modules/when/when.js:501:43)
      at Promise._message (/home/travis/build/TryGhost/Ghost/node_modules/when/when.js:426:25)
      at Array.deliver [as 0] (/home/travis/build/TryGhost/Ghost/node_modules/when/when.js:319:7)
      at runHandlers (/home/travis/build/TryGhost/Ghost/node_modules/when/when.js:385:12)
      at Array.2 (/home/travis/build/TryGhost/Ghost/node_modules/when/when.js:352:5)
      at runHandlers (/home/travis/build/TryGhost/Ghost/node_modules/when/when.js:385:12)
      at drainQueue (/home/travis/build/TryGhost/Ghost/node_modules/when/when.js:836:3)
      at process._tickCallback (node.js:415:13)

Which I can reproduce consistently. What's interesting about this error is that when I execute the tests for the first time I get expected 10 to equal 9 and when I execute them a second time I get the above error. There seems to be an issue cleaning up the database.

@ErisDS

This comment has been minimized.

Member

ErisDS commented Mar 16, 2014

I assumed they were all related as they all seemed to be numeric mismatch between how many things should be fetched and how many were. The bug was inconsistent but regular, now it is entirely consistent.

@halfdan

This comment has been minimized.

Member

halfdan commented Mar 16, 2014

Above test failure is actually an additional entry in the database.

select p.id, p.title, tags.name from posts as p, posts_tags, tags WHERE p.id = posts_tags.post_id AND posts_tags.tag_id = tags.id AND tags.name = 'injection' AND p.status = 'published' AND page='0';

The query returns 24 entries in SQLite but 25 in Postgres. Not yet sure what causes this mismatch.

halfdan added a commit to halfdan/Ghost that referenced this issue Mar 16, 2014

Fixes random pg failures.
fixes TryGhost#2075
- Updates knex to latest version
- Fixes expected value in page test
- Change fixture insertion to be sequential
- Add orderBy to insertMorePostsTags fixture helper

halfdan added a commit to halfdan/Ghost that referenced this issue Mar 16, 2014

Fixes random pg failures.
fixes TryGhost#2075
- Updates knex to latest version
- Fixes expected value in page test
- Change fixture insertion to be sequential
- Add orderBy to insertMorePostsTags fixture helper

halfdan added a commit to halfdan/Ghost that referenced this issue Mar 16, 2014

Fixes random pg failures.
fixes TryGhost#2075
- Updates knex to latest version
- Fixes expected value in page test
- Change fixture insertion to be sequential
- Add orderBy to insertMorePostsTags fixture helper

halfdan added a commit to halfdan/Ghost that referenced this issue Mar 16, 2014

Fixes random pg failures.
fixes TryGhost#2075
- Updates knex to latest version
- Fixes expected value in page test
- Change fixture insertion to be sequential
- Add orderBy to insertMorePostsTags fixture helper

halfdan added a commit to halfdan/Ghost that referenced this issue Mar 16, 2014

Fixes random pg failures.
fixes TryGhost#2075
- Updates knex to latest version
- Fixes expected value in page test
- Change fixture insertion to be sequential
- Add orderBy to insertMorePostsTags fixture helper

halfdan added a commit to halfdan/Ghost that referenced this issue Mar 16, 2014

Fixes random pg failures.
fixes TryGhost#2075
- Updates knex to latest version
- Fixes expected value in page test
- Change fixture insertion to be sequential
- Add orderBy to insertMorePostsTags fixture helper

halfdan added a commit to halfdan/Ghost that referenced this issue Mar 16, 2014

Fixes random pg failures.
fixes TryGhost#2075
- Updates knex to latest version
- Fixes expected value in page test
- Change fixture insertion to be sequential
- Add orderBy to insertMorePostsTags fixture helper

halfdan added a commit to halfdan/Ghost that referenced this issue Mar 16, 2014

Fixes random pg failures.
fixes TryGhost#2075
- Updates knex to latest version
- Fixes expected value in page test
- Change fixture insertion to be sequential
- Add orderBy to insertMorePostsTags fixture helper

halfdan added a commit to halfdan/Ghost that referenced this issue Mar 16, 2014

Fixes random pg failures.
fixes TryGhost#2075
- Updates knex to latest version
- Fixes expected value in page test
- Change fixture insertion to be sequential
- Add orderBy to insertMorePostsTags fixture helper

halfdan added a commit to halfdan/Ghost that referenced this issue Mar 16, 2014

Fixes random pg failures.
fixes TryGhost#2075
- Updates knex to latest version
- Fixes expected value in page test
- Change fixture insertion to be sequential
- Add orderBy to insertMorePostsTags fixture helper

halfdan added a commit to halfdan/Ghost that referenced this issue Mar 16, 2014

Fixes random pg failures.
fixes TryGhost#2075
- Updates knex to latest version
- Fixes expected value in page test
- Change fixture insertion to be sequential
- Add orderBy to insertMorePostsTags fixture helper

halfdan added a commit to halfdan/Ghost that referenced this issue Mar 16, 2014

Fixes random pg failures.
fixes TryGhost#2075
- Updates knex to latest version
- Fixes expected value in page test
- Change fixture insertion to be sequential
- Add orderBy to insertMorePostsTags fixture helper

halfdan added a commit to halfdan/Ghost that referenced this issue Mar 16, 2014

Fixes random pg failures.
fixes TryGhost#2075
- Updates knex to latest version
- Fixes expected value in page test
- Change fixture insertion to be sequential
- Add orderBy to insertMorePostsTags fixture helper

halfdan added a commit to halfdan/Ghost that referenced this issue Mar 17, 2014

Fixes random pg failures.
fixes TryGhost#2075
- Updates knex to latest version
- Fixes expected value in page test
- Change fixture insertion to be sequential
- Add orderBy to insertMorePostsTags fixture helper

halfdan added a commit to halfdan/Ghost that referenced this issue Mar 17, 2014

Fixes random pg failures.
fixes TryGhost#2075
- Updates knex to latest version
- Fixes expected value in page test
- Change fixture insertion to be sequential
- Add orderBy to insertMorePostsTags fixture helper

halfdan added a commit to halfdan/Ghost that referenced this issue Mar 17, 2014

Fixes random pg failures.
fixes TryGhost#2075
- Updates knex to latest version
- Fixes expected value in page test
- Change fixture insertion to be sequential
- Add orderBy to insertMorePostsTags fixture helper

halfdan added a commit to halfdan/Ghost that referenced this issue Mar 17, 2014

Fixes random pg failures.
fixes TryGhost#2075
- Updates knex to latest version
- Fixes expected value in page test
- Change fixture insertion to be sequential
- Add orderBy to insertMorePostsTags fixture helper

@ErisDS ErisDS closed this in #2409 Mar 17, 2014

aiampogi added a commit to aiampogi/Ghost that referenced this issue Apr 14, 2014

Fixes random pg failures.
fixes TryGhost#2075
- Updates knex to latest version
- Fixes expected value in page test
- Change fixture insertion to be sequential
- Add orderBy to insertMorePostsTags fixture helper

morficus pushed a commit to morficus/Ghost that referenced this issue Sep 4, 2014

Fixes random pg failures.
fixes TryGhost#2075
- Updates knex to latest version
- Fixes expected value in page test
- Change fixture insertion to be sequential
- Add orderBy to insertMorePostsTags fixture helper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment