File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
library/src/test/java/com/pengrad/telegrambot Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -989,7 +989,14 @@ public void setWebhook() throws IOException {
989989 assertTrue (webhookInfo .hasCustomCertificate ());
990990 assertEquals (maxConnections , webhookInfo .maxConnections ());
991991 assertArrayEquals (allowedUpdates , webhookInfo .allowedUpdates ());
992- assertNotNull (webhookInfo .lastErrorDate ());
992+ Integer lastErrorDate = webhookInfo .lastErrorDate ();
993+ if (lastErrorDate != null ) {
994+ assertEquals (System .currentTimeMillis (), lastErrorDate * 1000L , 30_000L );
995+ }
996+ String lastErrorMessage = webhookInfo .lastErrorMessage ();
997+ if (lastErrorMessage != null ) {
998+ assertTrue (lastErrorMessage .contains ("SSL" ));
999+ }
9931000 assertNotNull (webhookInfo .lastErrorMessage ());
9941001 assertEquals (ipAddress , webhookInfo .ipAddress ());
9951002 assertEquals (0 , webhookInfo .pendingUpdateCount ().intValue ());
You can’t perform that action at this time.
0 commit comments