Skip to content

Commit

Permalink
Merge pull request #201 from denizzzka/dyn_unm_fix_bak
Browse files Browse the repository at this point in the history
CI fix
  • Loading branch information
denizzzka authored Jul 24, 2024
2 parents 6e4f4e6 + a9469de commit 515f526
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
9 changes: 0 additions & 9 deletions integration_tests/integration_tests.d
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,5 @@ int main(string[] args)
native._integration_test( conninfo );
bson._integration_test( conninfo );

version(Test_Dynamic_Unmanaged)
{
import core.memory: GC;
import derelict.pq.pq;

GC.collect(); // Ensures that all related to libpq objects are destroyed
DerelictPQ.unload();
}

return 0;
}
8 changes: 8 additions & 0 deletions src/dpq2/query.d
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,8 @@ void _integration_test( string connParam ) @trusted
conn.socket.shutdown(SocketShutdown.BOTH); // breaks connection

{
import dpq2.result: ResponseException;

bool exceptionFlag = false;
string errorMsg;

Expand All @@ -511,6 +513,12 @@ void _integration_test( string connParam ) @trusted
errorMsg = e.msg;
assert(e.msg.length > 15); // error message check
}
catch(ResponseException e)
{
exceptionFlag = true;
errorMsg = e.msg;
assert(e.msg.length > 15); // error message check
}
finally {
assert(exceptionFlag, errorMsg);
}
Expand Down

0 comments on commit 515f526

Please sign in to comment.