You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tl;dr: updateOrCreate a creature, modify the creature using mikeal/request, get the creature, modify it with the persistence engine, and update it.
Here's the output from that test (tl;dr: modifications to life do not register after get, and returned object after get does not conform to update's schema):
# modify persisted documents outside of jugglingdb
ok 68 successfully created korben
ok 69 korben has life 10
ok 70 successfully requested couchdb document
ok 71 successfully modified couchd document
ok 72 successfully got korben
not ok 73 korben has life 100
---
file: /home/josh/dev/bigcompany/resource/index.js
line: 733
column: 9
stack:
- getCaller (/home/josh/dev/bigcompany/resource/node_modules/tap/lib/tap-assert.js:418:17)
- assert (/home/josh/dev/bigcompany/resource/node_modules/tap/lib/tap-assert.js:21:16)
- Function.equal (/home/josh/dev/bigcompany/resource/node_modules/tap/lib/tap-assert.js:162:10)
- Test._testAssert [as equal] (/home/josh/dev/bigcompany/resource/node_modules/tap/lib/tap-test.js:86:16)
- /home/josh/dev/bigcompany/resource/test/persistence.js:291:13
- /home/josh/dev/bigcompany/resource/index.js:685:29
- afterHooks (/home/josh/dev/bigcompany/resource/index.js:733:9)
- callbackWrap (/home/josh/dev/bigcompany/resource/index.js:681:18)
- _args (/home/josh/dev/bigcompany/resource/index.js:651:33)
- exports.enable.r.method.description (/home/josh/dev/bigcompany/resource/lib/persistence.js:140:7)
found: 10
wanted: 100
...
not ok 74 successfully updated korben
---
type: Error
message: |
Invalid arguments for method `creature.update`. [
{
"attribute": "type",
"property": "metadata",
"expected": "object",
"actual": "object",
"message": "must be of object type"
},
{
"attribute": "type",
"property": "items",
"expected": "array",
"actual": "object",
"message": "must be of array type"
}
]
code: ~
errno: ~
file: /home/josh/dev/bigcompany/resource/index.js
line: 535
column: 29
stack:
- {
- "attribute": "type",
- "property": "metadata",
- "expected": "object",
- "actual": "object",
- "message": "must be of object type"
- },
- {
- "attribute": "type",
- "property": "items",
- "expected": "array",
- "actual": "object",
- "message": "must be of array type"
- }
- ]
- execute (/home/josh/dev/bigcompany/resource/index.js:535:29)
- /home/josh/dev/bigcompany/resource/index.js:409:16
- beforeHooks (/home/josh/dev/bigcompany/resource/index.js:471:16)
- /home/josh/dev/bigcompany/resource/index.js:400:14
- beforeAllHooks (/home/josh/dev/bigcompany/resource/index.js:440:16)
- EventEmitter.fn [as update] (/home/josh/dev/bigcompany/resource/index.js:391:12)
- /home/josh/dev/bigcompany/resource/test/persistence.js:295:20
- /home/josh/dev/bigcompany/resource/index.js:685:29
- afterHooks (/home/josh/dev/bigcompany/resource/index.js:733:9)
- callbackWrap (/home/josh/dev/bigcompany/resource/index.js:681:18)
...
not ok 75 korben has life 50
---
file: /home/josh/dev/bigcompany/resource/index.js
line: 547
column: 20
stack:
- getCaller (/home/josh/dev/bigcompany/resource/node_modules/tap/lib/tap-assert.js:418:17)
- assert (/home/josh/dev/bigcompany/resource/node_modules/tap/lib/tap-assert.js:21:16)
- Function.equal (/home/josh/dev/bigcompany/resource/node_modules/tap/lib/tap-assert.js:162:10)
- Test._testAssert [as equal] (/home/josh/dev/bigcompany/resource/node_modules/tap/lib/tap-test.js:86:16)
- /home/josh/dev/bigcompany/resource/test/persistence.js:299:15
- execute (/home/josh/dev/bigcompany/resource/index.js:547:20)
- /home/josh/dev/bigcompany/resource/index.js:409:16
- beforeHooks (/home/josh/dev/bigcompany/resource/index.js:471:16)
- /home/josh/dev/bigcompany/resource/index.js:400:14
- beforeAllHooks (/home/josh/dev/bigcompany/resource/index.js:440:16)
found: ~
wanted: 50
type:
found: undefined
wanted: undefined
...
I suspect that once the schema issues are resolved, that couchdb will fail to update due to an update conflict because jugglingdb appears to be caching.
The text was updated successfully, but these errors were encountered:
Basically, if you modify any documents using futon, you're going to have a bad time.
Here's tests:
5e7e4f9
tl;dr: updateOrCreate a creature, modify the creature using mikeal/request, get the creature, modify it with the persistence engine, and update it.
Here's the output from that test (tl;dr: modifications to life do not register after get, and returned object after get does not conform to update's schema):
I suspect that once the schema issues are resolved, that couchdb will fail to update due to an update conflict because jugglingdb appears to be caching.
The text was updated successfully, but these errors were encountered: