mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-03-25 21:39:21 +02:00
Main build (Jenkins)
This commit is contained in:
parent
a786c35cd1
commit
52536bff1c
4
.github/workflows/oint_test_full_ru.yml
vendored
4
.github/workflows/oint_test_full_ru.yml
vendored
@ -1398,6 +1398,10 @@ jobs:
|
||||
if: ${{ cancelled() }} == false
|
||||
run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os "CLI_TC_Клиент"
|
||||
|
||||
- name: TCP Сервер
|
||||
if: ${{ cancelled() }} == false
|
||||
run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os "CLI_TC_Сервер"
|
||||
|
||||
- name: Записать логи
|
||||
if: ${{ cancelled() }} == false
|
||||
uses: actions/cache/save@v3
|
||||
|
4
ci/cli_ostestru
vendored
4
ci/cli_ostestru
vendored
@ -691,6 +691,10 @@ pipeline {
|
||||
powershell encoding: 'UTF-8', script:'1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_TC_Клиент"'
|
||||
}
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_TC_Сервер"'
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
4
ci/ostestru
vendored
4
ci/ostestru
vendored
@ -691,6 +691,10 @@ pipeline {
|
||||
powershell encoding: 'UTF-8', script:'1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "TC_Клиент"'
|
||||
}
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "TC_Сервер"'
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
16
docs/en/examples/TCP/AwaitingConnection.txt
vendored
Normal file
16
docs/en/examples/TCP/AwaitingConnection.txt
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
TCPServer = OPI_TCP.CreateServer(7788, True);
|
||||
|
||||
For N = 1 To 5 Do
|
||||
|
||||
NewConnection = OPI_TCP.AwaitingConnection(TCPServer, 20);
|
||||
|
||||
If NewConnection["result"] Then
|
||||
Connection = NewConnection["connection"];
|
||||
Else
|
||||
Continue;
|
||||
EndIf;
|
||||
|
||||
Response = OPI_TCP.SendData(TCPServer, Connection, ПолучитьДвоичныеДанныеИзСтроки("Yo"));
|
||||
Closing = OPI_TCP.CloseIncomingConnection(TCPServer, Connection);
|
||||
|
||||
EndDo;
|
@ -31,7 +31,22 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
```bsl title="1C:Enterprise/OneScript code example"
|
||||
TCPServer = OPI_TCP.CreateServer(7788, True);
|
||||
|
||||
For N = 1 To 5 Do
|
||||
|
||||
NewConnection = OPI_TCP.AwaitingConnection(TCPServer, 20);
|
||||
|
||||
If NewConnection["result"] Then
|
||||
Connection = NewConnection["connection"];
|
||||
Else
|
||||
Continue;
|
||||
EndIf;
|
||||
|
||||
Response = OPI_TCP.SendData(TCPServer, Connection, ПолучитьДвоичныеДанныеИзСтроки("Yo"));
|
||||
Closing = OPI_TCP.CloseIncomingConnection(TCPServer, Connection);
|
||||
|
||||
EndDo;
|
||||
```
|
||||
|
||||
|
||||
|
16
docs/ru/examples/TCP/ОжидатьПодключение.txt
vendored
Normal file
16
docs/ru/examples/TCP/ОжидатьПодключение.txt
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
TCPСервер = OPI_TCP.СоздатьСервер(7788, Истина);
|
||||
|
||||
Для Н = 1 По 5 Цикл
|
||||
|
||||
НовоеПодключение = OPI_TCP.ОжидатьПодключение(TCPСервер, 20);
|
||||
|
||||
Если НовоеПодключение["result"] Тогда
|
||||
Подключение = НовоеПодключение["connection"];
|
||||
Иначе
|
||||
Продолжить;
|
||||
КонецЕсли;
|
||||
|
||||
Ответ = OPI_TCP.ОтправитьДанные(TCPСервер, Подключение, ПолучитьДвоичныеДанныеИзСтроки("Yo"));
|
||||
Закрытие = OPI_TCP.ЗакрытьВходящееСоединение(TCPСервер, Подключение);
|
||||
|
||||
КонецЦикла;
|
@ -31,7 +31,22 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
```bsl title="Пример использования для 1С:Предприятие/OneScript"
|
||||
TCPСервер = OPI_TCP.СоздатьСервер(7788, Истина);
|
||||
|
||||
Для Н = 1 По 5 Цикл
|
||||
|
||||
НовоеПодключение = OPI_TCP.ОжидатьПодключение(TCPСервер, 20);
|
||||
|
||||
Если НовоеПодключение["result"] Тогда
|
||||
Подключение = НовоеПодключение["connection"];
|
||||
Иначе
|
||||
Продолжить;
|
||||
КонецЕсли;
|
||||
|
||||
Ответ = OPI_TCP.ОтправитьДанные(TCPСервер, Подключение, ПолучитьДвоичныеДанныеИзСтроки("Yo"));
|
||||
Закрытие = OPI_TCP.ЗакрытьВходящееСоединение(TCPСервер, Подключение);
|
||||
|
||||
КонецЦикла;
|
||||
```
|
||||
|
||||
|
||||
|
12502
service/dictionaries/en.json
vendored
12502
service/dictionaries/en.json
vendored
File diff suppressed because it is too large
Load Diff
22
src/en/OInt/core/Modules/OPI_TCP.os
vendored
22
src/en/OInt/core/Modules/OPI_TCP.os
vendored
@ -272,7 +272,7 @@ EndFunction
|
||||
// Structure Of KeyAndValue - Structure with information about the startup success
|
||||
Function StartServer(Val TCPServer) Export
|
||||
|
||||
If Not OPI_Tools.IsServer(TCPServer) Then
|
||||
If Not IsServer(TCPServer) Then
|
||||
Raise "The passed value is not a TCP server!";
|
||||
EndIf;
|
||||
|
||||
@ -296,15 +296,17 @@ EndFunction
|
||||
// Structure Of KeyAndValue - Structure with new connection ID or error information
|
||||
Function AwaitingConnection(Val TCPServer, Val Timeout = 0) Export
|
||||
|
||||
If Not OPI_Tools.IsServer(TCPServer) Then
|
||||
If Not IsServer(TCPServer) Then
|
||||
Raise "The passed value is not a TCP server!";
|
||||
EndIf;
|
||||
|
||||
OPI_TypeConversion.GetNumber(Timeout);
|
||||
|
||||
NewConnection = TCPServer.Wait(Timeout);
|
||||
Result = TCPServer.Wait(Timeout);
|
||||
|
||||
Return NewConnection;
|
||||
ProcessResult(Result);
|
||||
|
||||
Return Result;
|
||||
|
||||
EndFunction
|
||||
|
||||
@ -320,7 +322,7 @@ EndFunction
|
||||
// Structure Of KeyAndValue, BinaryData - Binary data on success or structure with error description
|
||||
Function ReceiveData(Val TCPServer, Val ConnectionID, Val MaxSize = 0) Export
|
||||
|
||||
If Not OPI_Tools.IsServer(TCPServer) Then
|
||||
If Not IsServer(TCPServer) Then
|
||||
Raise "The passed value is not a TCP server!";
|
||||
EndIf;
|
||||
|
||||
@ -357,7 +359,7 @@ EndFunction
|
||||
// Structure Of KeyAndValue - Execution information
|
||||
Function SendData(Val TCPServer, Val ConnectionID, Val Data) Export
|
||||
|
||||
If Not OPI_Tools.IsServer(TCPServer) Then
|
||||
If Not IsServer(TCPServer) Then
|
||||
Raise "The passed value is not a TCP server!";
|
||||
EndIf;
|
||||
|
||||
@ -383,7 +385,7 @@ EndFunction
|
||||
// Structure Of KeyAndValue - Execution information
|
||||
Function StopServer(Val TCPServer) Export
|
||||
|
||||
If Not OPI_Tools.IsServer(TCPServer) Then
|
||||
If Not IsServer(TCPServer) Then
|
||||
Raise "The passed value is not a TCP server!";
|
||||
EndIf;
|
||||
|
||||
@ -407,7 +409,7 @@ EndFunction
|
||||
// Structure Of KeyAndValue - Execution information
|
||||
Function CloseIncomingConnection(Val TCPServer, Val ConnectionID) Export
|
||||
|
||||
If Not OPI_Tools.IsServer(TCPServer) Then
|
||||
If Not IsServer(TCPServer) Then
|
||||
Raise "The passed value is not a TCP server!";
|
||||
EndIf;
|
||||
|
||||
@ -436,7 +438,7 @@ EndFunction
|
||||
// Structure Of KeyAndValue - Execution information
|
||||
Function GetIncomingConnections(Val TCPServer) Export
|
||||
|
||||
If Not OPI_Tools.IsServer(TCPServer) Then
|
||||
If Not IsServer(TCPServer) Then
|
||||
Raise "The passed value is not a TCP server!";
|
||||
EndIf;
|
||||
|
||||
@ -459,7 +461,7 @@ EndFunction
|
||||
// Structure Of KeyAndValue - Execution information
|
||||
Function ActualiseIncomingConnections(Val TCPServer) Export
|
||||
|
||||
If Not OPI_Tools.IsServer(TCPServer) Then
|
||||
If Not IsServer(TCPServer) Then
|
||||
Raise "The passed value is not a TCP server!";
|
||||
EndIf;
|
||||
|
||||
|
29
src/en/OInt/tests/Modules/internal/OPI_Tests.os
vendored
29
src/en/OInt/tests/Modules/internal/OPI_Tests.os
vendored
@ -2241,6 +2241,14 @@ Procedure TC_Client() Export
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure TC_Server() Export
|
||||
|
||||
TestParameters = New Structure;
|
||||
|
||||
TCP_AwaitingConnection(TestParameters);
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region SQLite
|
||||
@ -16446,6 +16454,27 @@ Procedure TCP_SendLine(FunctionParameters) Export
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure TCP_AwaitingConnection(FunctionParameters) Export
|
||||
|
||||
TCPServer = OPI_TCP.CreateServer(7788, True);
|
||||
|
||||
For N = 1 To 5 Do
|
||||
|
||||
NewConnection = OPI_TCP.AwaitingConnection(TCPServer, 20);
|
||||
|
||||
If NewConnection["result"] Then
|
||||
Connection = NewConnection["connection"];
|
||||
Else
|
||||
Continue;
|
||||
EndIf;
|
||||
|
||||
Response = OPI_TCP.SendData(TCPServer, Connection, ПолучитьДвоичныеДанныеИзСтроки("Yo"));
|
||||
Closing = OPI_TCP.CloseIncomingConnection(TCPServer, Connection);
|
||||
|
||||
EndDo;
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region SQLite
|
||||
|
@ -268,6 +268,7 @@ Function GetTestTable() Export
|
||||
NewTest(TestTable, "AWS_BucketsManagement" , "Buckets management" , S3_);
|
||||
NewTest(TestTable, "AWS_ObjectsManagement" , "Objects management" , S3_);
|
||||
NewTest(TestTable, "TC_Client" , "TCP Client" , TCP);
|
||||
NewTest(TestTable, "TC_Server" , "TCP Host" , TCP);
|
||||
NewTest(TestTable, "SQLL_CommonMethods" , "Common methods" , SQLite);
|
||||
NewTest(TestTable, "SQLL_ORM" , "ORM" , SQLite);
|
||||
|
||||
|
22
src/en/OPI/src/CommonModules/OPI_TCP/Module.bsl
vendored
22
src/en/OPI/src/CommonModules/OPI_TCP/Module.bsl
vendored
@ -272,7 +272,7 @@ EndFunction
|
||||
// Structure Of KeyAndValue - Structure with information about the startup success
|
||||
Function StartServer(Val TCPServer) Export
|
||||
|
||||
If Not OPI_Tools.IsServer(TCPServer) Then
|
||||
If Not IsServer(TCPServer) Then
|
||||
Raise "The passed value is not a TCP server!";
|
||||
EndIf;
|
||||
|
||||
@ -296,15 +296,17 @@ EndFunction
|
||||
// Structure Of KeyAndValue - Structure with new connection ID or error information
|
||||
Function AwaitingConnection(Val TCPServer, Val Timeout = 0) Export
|
||||
|
||||
If Not OPI_Tools.IsServer(TCPServer) Then
|
||||
If Not IsServer(TCPServer) Then
|
||||
Raise "The passed value is not a TCP server!";
|
||||
EndIf;
|
||||
|
||||
OPI_TypeConversion.GetNumber(Timeout);
|
||||
|
||||
NewConnection = TCPServer.Wait(Timeout);
|
||||
Result = TCPServer.Wait(Timeout);
|
||||
|
||||
Return NewConnection;
|
||||
ProcessResult(Result);
|
||||
|
||||
Return Result;
|
||||
|
||||
EndFunction
|
||||
|
||||
@ -320,7 +322,7 @@ EndFunction
|
||||
// Structure Of KeyAndValue, BinaryData - Binary data on success or structure with error description
|
||||
Function ReceiveData(Val TCPServer, Val ConnectionID, Val MaxSize = 0) Export
|
||||
|
||||
If Not OPI_Tools.IsServer(TCPServer) Then
|
||||
If Not IsServer(TCPServer) Then
|
||||
Raise "The passed value is not a TCP server!";
|
||||
EndIf;
|
||||
|
||||
@ -357,7 +359,7 @@ EndFunction
|
||||
// Structure Of KeyAndValue - Execution information
|
||||
Function SendData(Val TCPServer, Val ConnectionID, Val Data) Export
|
||||
|
||||
If Not OPI_Tools.IsServer(TCPServer) Then
|
||||
If Not IsServer(TCPServer) Then
|
||||
Raise "The passed value is not a TCP server!";
|
||||
EndIf;
|
||||
|
||||
@ -383,7 +385,7 @@ EndFunction
|
||||
// Structure Of KeyAndValue - Execution information
|
||||
Function StopServer(Val TCPServer) Export
|
||||
|
||||
If Not OPI_Tools.IsServer(TCPServer) Then
|
||||
If Not IsServer(TCPServer) Then
|
||||
Raise "The passed value is not a TCP server!";
|
||||
EndIf;
|
||||
|
||||
@ -407,7 +409,7 @@ EndFunction
|
||||
// Structure Of KeyAndValue - Execution information
|
||||
Function CloseIncomingConnection(Val TCPServer, Val ConnectionID) Export
|
||||
|
||||
If Not OPI_Tools.IsServer(TCPServer) Then
|
||||
If Not IsServer(TCPServer) Then
|
||||
Raise "The passed value is not a TCP server!";
|
||||
EndIf;
|
||||
|
||||
@ -436,7 +438,7 @@ EndFunction
|
||||
// Structure Of KeyAndValue - Execution information
|
||||
Function GetIncomingConnections(Val TCPServer) Export
|
||||
|
||||
If Not OPI_Tools.IsServer(TCPServer) Then
|
||||
If Not IsServer(TCPServer) Then
|
||||
Raise "The passed value is not a TCP server!";
|
||||
EndIf;
|
||||
|
||||
@ -459,7 +461,7 @@ EndFunction
|
||||
// Structure Of KeyAndValue - Execution information
|
||||
Function ActualiseIncomingConnections(Val TCPServer) Export
|
||||
|
||||
If Not OPI_Tools.IsServer(TCPServer) Then
|
||||
If Not IsServer(TCPServer) Then
|
||||
Raise "The passed value is not a TCP server!";
|
||||
EndIf;
|
||||
|
||||
|
@ -268,6 +268,7 @@ Function GetTestTable() Export
|
||||
NewTest(TestTable, "AWS_BucketsManagement" , "Buckets management" , S3_);
|
||||
NewTest(TestTable, "AWS_ObjectsManagement" , "Objects management" , S3_);
|
||||
NewTest(TestTable, "TC_Client" , "TCP Client" , TCP);
|
||||
NewTest(TestTable, "TC_Server" , "TCP Host" , TCP);
|
||||
NewTest(TestTable, "SQLL_CommonMethods" , "Common methods" , SQLite);
|
||||
NewTest(TestTable, "SQLL_ORM" , "ORM" , SQLite);
|
||||
|
||||
|
@ -2241,6 +2241,14 @@ Procedure TC_Client() Export
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure TC_Server() Export
|
||||
|
||||
TestParameters = New Structure;
|
||||
|
||||
TCP_AwaitingConnection(TestParameters);
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region SQLite
|
||||
@ -16446,6 +16454,27 @@ Procedure TCP_SendLine(FunctionParameters) Export
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure TCP_AwaitingConnection(FunctionParameters) Export
|
||||
|
||||
TCPServer = OPI_TCP.CreateServer(7788, True);
|
||||
|
||||
For N = 1 To 5 Do
|
||||
|
||||
NewConnection = OPI_TCP.AwaitingConnection(TCPServer, 20);
|
||||
|
||||
If NewConnection["result"] Then
|
||||
Connection = NewConnection["connection"];
|
||||
Else
|
||||
Continue;
|
||||
EndIf;
|
||||
|
||||
Response = OPI_TCP.SendData(TCPServer, Connection, GetBinaryDataFromString("Yo"));
|
||||
Closing = OPI_TCP.CloseIncomingConnection(TCPServer, Connection);
|
||||
|
||||
EndDo;
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region SQLite
|
||||
|
2
src/ru/OInt/core/Modules/OPI_TCP.os
vendored
2
src/ru/OInt/core/Modules/OPI_TCP.os
vendored
@ -304,7 +304,7 @@
|
||||
|
||||
Результат = TCPСервер.Wait(Таймаут);
|
||||
|
||||
ОбработатьРезультат(Результат);
|
||||
ОбработатьРезультат(Результат);
|
||||
|
||||
Возврат Результат;
|
||||
|
||||
|
36
src/ru/OInt/tests/Modules/internal/OPI_Тесты.os
vendored
36
src/ru/OInt/tests/Modules/internal/OPI_Тесты.os
vendored
@ -2238,14 +2238,14 @@
|
||||
TCP_ПрочитатьСтроку(ПараметрыТеста);
|
||||
TCP_ОтправитьСтроку(ПараметрыТеста);
|
||||
TCP_ОбработатьЗапрос(ПараметрыТеста);
|
||||
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
Процедура TC_Сервер() Экспорт
|
||||
|
||||
ПараметрыТеста = Новый Структура;
|
||||
|
||||
TCP_ОжидатьПодключение(ПараметрыТеста);
|
||||
ПараметрыТеста = Новый Структура;
|
||||
|
||||
TCP_ОжидатьПодключение(ПараметрыТеста);
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
@ -16455,24 +16455,24 @@
|
||||
КонецПроцедуры
|
||||
|
||||
Процедура TCP_ОжидатьПодключение(ПараметрыФункции) Экспорт
|
||||
|
||||
|
||||
TCPСервер = OPI_TCP.СоздатьСервер(7788, Истина);
|
||||
|
||||
|
||||
Для Н = 1 По 5 Цикл
|
||||
|
||||
|
||||
НовоеПодключение = OPI_TCP.ОжидатьПодключение(TCPСервер, 20);
|
||||
|
||||
Если НовоеПодключение["result"] Тогда
|
||||
Подключение = НовоеПодключение["connection"];
|
||||
Иначе
|
||||
Продолжить;
|
||||
КонецЕсли;
|
||||
|
||||
Ответ = OPI_TCP.ОтправитьДанные(TCPСервер, Подключение, ПолучитьДвоичныеДанныеИзСтроки("Yo"));
|
||||
Закрытие = OPI_TCP.ЗакрытьВходящееСоединение(TCPСервер, Подключение);
|
||||
|
||||
|
||||
Если НовоеПодключение["result"] Тогда
|
||||
Подключение = НовоеПодключение["connection"];
|
||||
Иначе
|
||||
Продолжить;
|
||||
КонецЕсли;
|
||||
|
||||
Ответ = OPI_TCP.ОтправитьДанные(TCPСервер, Подключение, ПолучитьДвоичныеДанныеИзСтроки("Yo"));
|
||||
Закрытие = OPI_TCP.ЗакрытьВходящееСоединение(TCPСервер, Подключение);
|
||||
|
||||
КонецЦикла;
|
||||
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
#КонецОбласти
|
||||
|
@ -268,7 +268,7 @@
|
||||
НовыйТест(ТаблицаТестов, "AWS_РаботаСБакетами" , "Работа с бакетами" , S3_);
|
||||
НовыйТест(ТаблицаТестов, "AWS_РаботаСОбъектами" , "Работа с объектами" , S3_);
|
||||
НовыйТест(ТаблицаТестов, "TC_Клиент" , "TCP Клиент" , TCP);
|
||||
НовыйТест(ТаблицаТестов, "TC_Сервер" , "TCP Сервер" , TCP);
|
||||
НовыйТест(ТаблицаТестов, "TC_Сервер" , "TCP Сервер" , TCP);
|
||||
НовыйТест(ТаблицаТестов, "SQLL_ОсновныеМетоды" , "Основные методы" , SQLite);
|
||||
НовыйТест(ТаблицаТестов, "SQLL_ORM" , "ORM" , SQLite);
|
||||
|
||||
@ -2133,9 +2133,9 @@
|
||||
КонецФункции
|
||||
|
||||
Функция ПолучитьОбщийМодуль(Знач Имя)
|
||||
|
||||
|
||||
Модуль = Вычислить(Имя);
|
||||
|
||||
|
||||
Возврат Модуль;
|
||||
КонецФункции
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_TCP.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_TCP.os
|
||||
// Lib: TCP
|
||||
// CLI: tcp
|
||||
|
||||
@ -304,7 +304,7 @@
|
||||
|
||||
Результат = TCPСервер.Wait(Таймаут);
|
||||
|
||||
ОбработатьРезультат(Результат);
|
||||
ОбработатьРезультат(Результат);
|
||||
|
||||
Возврат Результат;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/tools/Modules/OPI_ПолучениеДанныхТестов.os
|
||||
// OneScript: ./OInt/tools/Modules/OPI_ПолучениеДанныхТестов.os
|
||||
|
||||
// MIT License
|
||||
|
||||
@ -268,7 +268,7 @@
|
||||
НовыйТест(ТаблицаТестов, "AWS_РаботаСБакетами" , "Работа с бакетами" , S3_);
|
||||
НовыйТест(ТаблицаТестов, "AWS_РаботаСОбъектами" , "Работа с объектами" , S3_);
|
||||
НовыйТест(ТаблицаТестов, "TC_Клиент" , "TCP Клиент" , TCP);
|
||||
НовыйТест(ТаблицаТестов, "TC_Сервер" , "TCP Сервер" , TCP);
|
||||
НовыйТест(ТаблицаТестов, "TC_Сервер" , "TCP Сервер" , TCP);
|
||||
НовыйТест(ТаблицаТестов, "SQLL_ОсновныеМетоды" , "Основные методы" , SQLite);
|
||||
НовыйТест(ТаблицаТестов, "SQLL_ORM" , "ORM" , SQLite);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/tests/Modules/internal/OPI_Тесты.os
|
||||
// OneScript: ./OInt/tests/Modules/internal/OPI_Тесты.os
|
||||
|
||||
// MIT License
|
||||
|
||||
@ -2238,14 +2238,14 @@
|
||||
TCP_ПрочитатьСтроку(ПараметрыТеста);
|
||||
TCP_ОтправитьСтроку(ПараметрыТеста);
|
||||
TCP_ОбработатьЗапрос(ПараметрыТеста);
|
||||
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
Процедура TC_Сервер() Экспорт
|
||||
|
||||
ПараметрыТеста = Новый Структура;
|
||||
|
||||
TCP_ОжидатьПодключение(ПараметрыТеста);
|
||||
ПараметрыТеста = Новый Структура;
|
||||
|
||||
TCP_ОжидатьПодключение(ПараметрыТеста);
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
@ -16455,24 +16455,24 @@
|
||||
КонецПроцедуры
|
||||
|
||||
Процедура TCP_ОжидатьПодключение(ПараметрыФункции) Экспорт
|
||||
|
||||
|
||||
TCPСервер = OPI_TCP.СоздатьСервер(7788, Истина);
|
||||
|
||||
|
||||
Для Н = 1 По 5 Цикл
|
||||
|
||||
|
||||
НовоеПодключение = OPI_TCP.ОжидатьПодключение(TCPСервер, 20);
|
||||
|
||||
Если НовоеПодключение["result"] Тогда
|
||||
Подключение = НовоеПодключение["connection"];
|
||||
Иначе
|
||||
Продолжить;
|
||||
КонецЕсли;
|
||||
|
||||
Ответ = OPI_TCP.ОтправитьДанные(TCPСервер, Подключение, ПолучитьДвоичныеДанныеИзСтроки("Yo"));
|
||||
Закрытие = OPI_TCP.ЗакрытьВходящееСоединение(TCPСервер, Подключение);
|
||||
|
||||
|
||||
Если НовоеПодключение["result"] Тогда
|
||||
Подключение = НовоеПодключение["connection"];
|
||||
Иначе
|
||||
Продолжить;
|
||||
КонецЕсли;
|
||||
|
||||
Ответ = OPI_TCP.ОтправитьДанные(TCPСервер, Подключение, ПолучитьДвоичныеДанныеИзСтроки("Yo"));
|
||||
Закрытие = OPI_TCP.ЗакрытьВходящееСоединение(TCPСервер, Подключение);
|
||||
|
||||
КонецЦикла;
|
||||
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
#КонецОбласти
|
||||
|
Loading…
x
Reference in New Issue
Block a user