[sharing] add unit test to test empty expire date

unit test to see if we can reproduce #9422 with some databases.

cc @PVince81