brianc / node-pg-pool

A connection pool for node-postgres
MIT License
180 stars 64 forks source link

Upgrade to test on node 10 #114

Closed brianc closed 5 years ago

brianc commented 5 years ago
brianc commented 5 years ago

apparently error.errno and error.code are platform specific for socket errors? The tests pass for me on os x but fail in travis on ubuntu? 🤷‍♂️

brianc commented 5 years ago

I think so - what do you think? The error numbers seem platform specific (weirdly) and the error messages changed between node versions. I suppose i could check process.version and assert differently

On Fri, Dec 14, 2018 at 9:48 PM Charmander notifications@github.com wrote:

@charmander commented on this pull request.

In test/error-handling.js https://github.com/brianc/node-pg-pool/pull/114#discussion_r241936985:

@@ -154,11 +154,15 @@ describe('pool error handling', function () {

   const pool = new Pool({ max: 1, port: closeServer.address().port })

   pool.connect((err) => {

     expect(err).to.be.an(Error)
  • expect(err.message).to.be('Connection terminated unexpectedly')

  • if (err.errno) {

Is allowing any error that doesn’t have an errno to pass the test okay?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/brianc/node-pg-pool/pull/114#pullrequestreview-185341216, or mute the thread https://github.com/notifications/unsubscribe-auth/AADDoRiB90WD77UXGcUsSKPdqfn2vcjUks5u5HEEgaJpZM4ZURC6 .

charmander commented 5 years ago

It’s probably fine to leave until the problematic version of Node goes EOL. :)