Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Websocket connection uptake #2178

Merged
merged 35 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
38692f1
feat: interim commit
gkc Mar 8, 2024
5d60232
Merge remote-tracking branch 'origin/trunk' into feat/web-socket-conn…
gkc Jul 5, 2024
15cdeff
Merge remote-tracking branch 'origin/trunk' into feat/web-socket-conn…
gkc Jul 15, 2024
9278521
chore: fix merge issue
gkc Jul 22, 2024
a526f6c
Merge remote-tracking branch 'origin/trunk' into feat/web-socket-conn…
gkc Jul 25, 2024
fd54baf
chore: to eliminate some lint messages following change of Dart minim…
gkc Jul 25, 2024
ce14b25
docs: add some code comments to explain how the ALPN support works
gkc Jul 25, 2024
1e7e9aa
make a webSocketListener function in at_secondary_impl; add a new met…
gkc Jul 25, 2024
d428b25
Merge remote-tracking branch 'origin/trunk' into feat/web-socket-conn…
gkc Jul 26, 2024
3a55fd9
Merge remote-tracking branch 'origin/trunk' into feat/web-socket-conn…
gkc Aug 27, 2024
a8bc574
feat: at_secondary_server: add createWebSocketConnection to connectio…
gkc Sep 5, 2024
dd4b339
Merge remote-tracking branch 'origin/trunk' into feat/web-socket-conn…
gkc Sep 5, 2024
81a130f
Merge remote-tracking branch 'origin/trunk' into feat/web-socket-conn…
gkc Sep 18, 2024
507aad9
refactor: allow creation of InboundWebSocketConnection with minimal d…
gkc Sep 18, 2024
fe52c06
feat: implement createWebSocketConnection in InboundConnectionManager
gkc Sep 18, 2024
ad62ece
feat: atServer support for atProtocol over websockets : MVP complete
gkc Sep 18, 2024
4ffb9ba
fix: logging cleanup for http get handling
gkc Oct 9, 2024
54a3229
chore: add a TODO
gkc Oct 22, 2024
b79ae5e
Merge remote-tracking branch 'origin/trunk' into feat/web-socket-conn…
gkc Nov 26, 2024
db7bebf
Merge branch 'trunk' of https://github.com/atsign-foundation/at_serve…
purnimavenkatasubbu Dec 11, 2024
3c65ad9
updated changelog and pubspec
purnimavenkatasubbu Dec 11, 2024
6deb580
fix analyzer issue
purnimavenkatasubbu Dec 11, 2024
3ae6a4f
chore: Added TODOs to add end-to-end tests for the websocket handling
gkc Dec 12, 2024
84419de
chore: removed a TODO which had been implemented
gkc Dec 12, 2024
810578e
test: removed unused `at_end2end_test/test/commons.dart`
gkc Dec 12, 2024
5b4e6b0
chore: syntax error?
gkc Dec 12, 2024
cc2ce8d
Merge branch 'trunk' into feat/web-socket-connections
gkc Dec 12, 2024
7a62b0e
test: removed unnecessary TODOS; updated config12.yaml adding connect…
gkc Dec 12, 2024
445bb02
test: fixed e2e_test_utils for new enum
gkc Dec 12, 2024
6aca4bd
test: fixed e2e_test_utils for new enum
gkc Dec 12, 2024
e56107d
Merge branch 'trunk' of https://github.com/atsign-foundation/at_serve…
purnimavenkatasubbu Dec 17, 2024
39600c9
addressed todos for e2e tests
purnimavenkatasubbu Dec 17, 2024
55da73f
Merge branch 'trunk' into feat/web-socket-connections
purnimavenkatasubbu Dec 18, 2024
60200fc
revert connectionType in config-e2etest-runtime.yaml
purnimavenkatasubbu Dec 18, 2024
30db96f
Merge branch 'feat/web-socket-connections' of https://github.com/atsi…
purnimavenkatasubbu Dec 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 0 additions & 119 deletions tests/at_end2end_test/test/commons.dart

This file was deleted.

19 changes: 13 additions & 6 deletions tests/at_end2end_test/test/e2e_test_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,17 @@ Future<SimpleOutboundSocketHandler> getSocketHandler(atSign) async {
if (asc == null) {
throw _NoSuchAtSignException('$atSign not configured');
}
// TODO switch on _AtSignConfig.connectionType and create a
// TODO SimpleOutboundSocketConnection or SimpleOutboundWebsocketConnection
// TODO as required
var handler = SimpleOutboundSocketHandler._(asc.host, asc.port, atSign);

// ignore: prefer_typing_uninitialized_variables
var handler;
switch(asc.connectionType!) {
case _ConnectionTypeEnum.socket:
handler = SimpleOutboundSocketHandler._(asc.host, asc.port, atSign);
break;
case _ConnectionTypeEnum.websocket:
// TODO e.g. handler = SimpleOutboundWebsocketConnection._(asc.host, asc.port, atSign);
throw UnimplementedError('e2e_test_utils cannot yet create a websocket connection');
}
purnimavenkatasubbu marked this conversation as resolved.
Show resolved Hide resolved

await handler.connect();
handler.startListening();
Expand Down Expand Up @@ -212,11 +219,11 @@ class _AtSignConfig {
String atSign;
String host;
int port;
_ConnectionTypeEnum connectionType;
_ConnectionTypeEnum? connectionType;

/// Creates and adds to [atSignConfigMap] or throws [_AtSignAlreadyAddedException] if we've already got it.
_AtSignConfig(this.atSign, this.host, this.port, this.connectionType) {
this.connectionType ??= _ConnectionTypeEnum.socket;
connectionType ??= _ConnectionTypeEnum.socket;
if (atSignConfigMap.containsKey(atSign)) {
throw _AtSignAlreadyAddedException("AtSignConfig for $atSign has already been created");
}
Expand Down
3 changes: 2 additions & 1 deletion tests/at_end2end_test/test/update_verb_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import 'dart:math';

import 'package:test/test.dart';

import 'commons.dart';
import 'e2e_test_utils.dart' as e2e;

void main() {
Expand Down Expand Up @@ -77,6 +76,8 @@ void main() {
expect(response, contains('data:$value'));

//LOOKUP VERB in the other secondary
var maxRetryCount = 10;
var retryCount = 1;
while (true) {
await sh2.writeCommand('llookup:cached:$atSign_2:youtube_id$atSign_1');
response = await sh2.read();
Expand Down
Loading