Skip to content

FbConnection.Open() throws an exception when used with unit tests. #959

@Aliotorem

Description

@Aliotorem

When using the FirebirdClient in an xUnit-project, a NullRefernceException gets thrown every time the method FbConnection.Open() is called.
The client is used in .NET Core 3.1. Lately we used .NET Framework 4.6.1 where the unit tests just worked fine.

Exception Message:
---- System.NullReferenceException : Object reference not set to an instance of an object.

Stack trace:
FbConnectionInternal.GetSystemWebHostingPath()
FbConnectionInternal.GetProcessName()
FbConnectionInternal.BuildDpb(DatabaseBase db, ConnectionString options)
FbConnectionInternal.Connect(AsyncWrappingCommonArgs async)
FbConnection.OpenImpl(AsyncWrappingCommonArgs async)
FbConnection.Open()

I've attached two projects. A console application, where the written code works and an xUnit-project, where it doesn't. Both in .NET Core 3.1.

FirebirdUnittests.zip

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions