Kitura / Kitura-CouchDB

CouchDB adapter for Kitura
Apache License 2.0
51 stars 29 forks source link

CouchDB Kitura NIO tests failing on Linux #91

Closed Andrew-Lees11 closed 5 years ago

Andrew-Lees11 commented 5 years ago

There was a missing return statement in the CouchDB tests. This was causing the tests to automatically pass without actually running. A pr fixing this has been raised here

Now the tests are running the KituraNio travis builds are failing.

We need to investigate why they are failing and either fix them or propose a new solution for making rest requests within this repo.

djones6 commented 5 years ago

Attn: @nethraravindran @pushkarnk

djones6 commented 5 years ago

All tests are failing with: DB creation error: 400 Error: bad_request, reason: Authorization header has invalid base64 value

djones6 commented 5 years ago

@pushkarnk turns out, I already fixed the failure above (https://github.com/IBM-Swift/Kitura-NIO/pull/116) - I restarted CI with this fix.

Now there is a crash in ClientRequest during the second CouchDB test: https://travis-ci.org/IBM-Swift/Kitura-CouchDB/jobs/455930086

Test Case 'DocumentViewTests.testViewTest' started at 2018-12-18 10:29:15.431
Exited with signal code 4
(lldb) target create ".build/debug/Kitura-CouchDBPackageTests.xctest" --core "./core"
Core file '/home/travis/build/IBM-Swift/Kitura-CouchDB/./core' (x86_64) was loaded.
(lldb) thread backtrace all
* thread #1, name = 'Kitura-CouchDBP', stop reason = signal SIGILL
  * frame #0: 0x000055cfa3ac7ecb Kitura-CouchDBPackageTests.xctest`ClientRequest.end(close=false, self=<unavailable>) at ClientRequest.swift:353
    frame #1: 0x000055cfa3a86ce2 Kitura-CouchDBPackageTests.xctest`Database.queryByView(view=<unavailable>, design=<unavailable>, params=<unavailable>, callback=<unavailable>, self=<unavailable>) at Database.swift:471
    frame #2: 0x000055cfa3aabd14 Kitura-CouchDBPackageTests.xctest`DocumentViewTests.readDocument(self=<unavailable>) at DocumentViewTests.swift:66
    frame #3: 0x000055cfa3aaf227 Kitura-CouchDBPackageTests.xctest`closure #1 in DocumentViewTests.createDesign(document=<unavailable>, error=<unavailable>, self=<unavailable>) at DocumentViewTests.swift:137
    frame #4: 0x000055cfa3aaf24c Kitura-CouchDBPackageTests.xctest`partial apply for closure #1 in DocumentViewTests.createDesign() at <compiler-generated>:0
    frame #5: 0x000055cfa3a88483 Kitura-CouchDBPackageTests.xctest`closure #1 in Database.createDesign(response=<unavailable>, doc=<unavailable>, callback=<unavailable>) at Database.swift:495
    frame #6: 0x000055cfa3a88525 Kitura-CouchDBPackageTests.xctest`partial apply for closure #1 in Database.createDesign(_:document:callback:) at <compiler-generated>:0
    frame #7: 0x000055cfa3ace618 Kitura-CouchDBPackageTests.xctest`closure #4 in HTTPClientHandler.channelRead(self=<unavailable>) at ClientRequest.swift:640
    frame #8: 0x000055cfa3ace65c Kitura-CouchDBPackageTests.xctest`partial apply for closure #4 in HTTPClientHandler.channelRead(ctx:data:) at <compiler-generated>:0
    frame #9: 0x000055cfa3a9099d Kitura-CouchDBPackageTests.xctest`thunk for @escaping @callee_guaranteed () -> () at <compiler-generated>:0
    frame #10: 0x00007f63ab232ae7 libdispatch.so`_dispatch_call_block_and_release + 7
    frame #11: 0x00007f63ab242549 libdispatch.so`_dispatch_worker_thread + 937
    frame #12: 0x00007f63aa999184 libpthread.so.0`start_thread + 196
    frame #13: 0x00007f63a898effd libc.so.6`clone + 109
pushkarnk commented 5 years ago

This fixes on of the failures seen in DocumentViewTests: https://github.com/IBM-Swift/Kitura-NIO/pull/171

There's another failure seen in AttachmentTest.swift, I'll investigate that next.

pushkarnk commented 5 years ago

The failure in AttachmentTest.swift goes away with this pull request: https://github.com/IBM-Swift/Kitura-NIO/pull/172

djones6 commented 5 years ago

Awaiting https://github.com/IBM-Swift/Kitura-NIO/pull/171 merge