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 88import okhttp3 .OkHttpClient ;
99import okhttp3 .Request ;
1010import okhttp3 .Response ;
11+ import okhttp3 .logging .HttpLoggingInterceptor ;
1112import org .junit .Test ;
1213
1314import java .io .File ;
2122import java .nio .file .Path ;
2223import java .nio .file .Paths ;
2324import java .util .*;
25+ import java .util .concurrent .TimeUnit ;
2426
2527import static com .pengrad .telegrambot .request .ContentTypes .VIDEO_MIME_TYPE ;
2628import static org .junit .Assert .*;
@@ -92,7 +94,12 @@ public TelegramBotTest() throws IOException {
9294 testPassportData = System .getenv ("TEST_PASSPORT_DATA" );
9395 }
9496
95- bot = TelegramBotAdapter .buildDebug (token );
97+ bot = new TelegramBot .Builder (token )
98+ .okHttpClient (new OkHttpClient .Builder ()
99+ .addInterceptor (new HttpLoggingInterceptor ().setLevel (HttpLoggingInterceptor .Level .BODY ))
100+ .readTimeout (60 , TimeUnit .SECONDS ) // setWebhook with certificate fails with timeout exception
101+ .build ())
102+ .build ();
96103 chatId = Integer .parseInt (chat );
97104 groupId = Long .parseLong (group );
98105 }
You can’t perform that action at this time.
0 commit comments