Skip to content

Commit

Permalink
Throw sink init exceptions
Browse files Browse the repository at this point in the history
Currently exceptions that occurr during automatic db or table creation when the sink is initialized, are not thrown to the caller/client program. This could hide or delay fatal problems from showing and was changed in this commit.

Related: #478
  • Loading branch information
ckadluba committed Aug 9, 2023
1 parent aef964a commit 12c265e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public void Execute()
catch (Exception ex)
{
HandleException(ex);
throw;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void HandlesExceptionFromSqlWriter()
};

// Act
_sut.Execute();
Assert.Throws<InvalidOperationException>(() => _sut.Execute());

// Assert
Assert.True(handlerCalled);
Expand All @@ -124,7 +124,7 @@ public void HandlesExceptionFromConnectionFactory()
};

// Act
_sut.Execute();
Assert.Throws<InvalidOperationException>(() => _sut.Execute());

// Assert
Assert.True(handlerCalled);
Expand All @@ -148,7 +148,7 @@ public void HandlesExceptionFromConnection()
};

// Act
_sut.Execute();
Assert.Throws<InvalidOperationException>(() => _sut.Execute());

// Assert
Assert.True(handlerCalled);
Expand All @@ -172,7 +172,7 @@ public void HandlesExceptionFromCommand()
};

// Act
_sut.Execute();
Assert.Throws<InvalidOperationException>(() => _sut.Execute());

// Assert
Assert.True(handlerCalled);
Expand Down

0 comments on commit 12c265e

Please sign in to comment.