Database cannot be opened. It is in the middle of a restore I have executed these two commands:

USE master
GO

RESTORE DATABASE test
FROM Kingston
WITH NORECOVERY
GO




USE master
GO
RESTORE LOG test
FROM Kingston
WITH STOPAT = '2020-05-13 14:05:25', RECOVERY;
GO


But now I get this error while accessing the database with USE test GO:


  Database 'test' cannot be opened. It is in the middle of a restore.


When it clearly isn't. Any suggestions how to fix it? So far found out that RECOVERY helps, but as you can see it doesn't. 

Edit

Changing NORECOVERY to RECOVERY doesn't help, because then I'm unable to execute 2nd command (throws error), and I need that log at specific moment. 

Edit

I have found the solution. You need additional command:

RESTORE DATABASE test
WITH RECOVERY
GO


It appears that RECOVERY is ignored in RESTORE LOG command, and it needs additional command to confirm that restoring has been finished. I appreciate the help though.
This

USE master
GO
RESTORE LOG test
FROM Kingston
WITH STOPAT = '2020-05-13 14:05:25', RECOVERY;


Will not perform recovery if the STOPAT time is outside the range of times in the log backup.  This allows you to specify the STOPAT for multiple log backups, and the database will only run recovery when you've applied the log backup containing the target time.

From the docs:


  The RECOVERY and STOPAT options. If the transaction log backup does
  not contain the requested time (for example, if the time specified is
  beyond the end of the time covered by the transaction log), a warning
  is generated and the database remains unrecovered.


Restore a SQL Server Database to a Point in Time (Full Recovery Model)