Commit 1d01932 1 parent 28d6d12 commit 1d01932 Copy full SHA for 1d01932
File tree 4 files changed +26
-7
lines changed
4 files changed +26
-7
lines changed Original file line number Diff line number Diff line change @@ -80,3 +80,4 @@ whisper.cpp/whisper.cpp-*/
80
80
.fvm /
81
81
82
82
integration_test /dendrite /config /jetstream /
83
+ integration_test /dendrite /config /logs /
Original file line number Diff line number Diff line change @@ -23,10 +23,22 @@ successfully. Also see [PR #1695](https://github.com/matthiasn/lotti/pull/1695)
23
23
24
24
## Testing with simulated bad network
25
25
26
- Install [ comcast ] ( https://github.com/tylertreat/Comcast ) , e.g. :
26
+ Install [ toxiproxy ] ( https://github.com/Shopify/toxiproxy ) and run server :
27
27
28
28
```` shell
29
- $ GOBIN= ~ /bin/ go install github.com/tylertreat/comcast@latest
29
+ $ toxiproxy-server
30
30
````
31
31
32
- To be continued.
32
+ In separate shell:
33
+
34
+ ```` shell
35
+ $ toxiproxy-cli create -l localhost:18008 -u localhost:8008 dendrite-proxy
36
+ $ toxiproxy-cli toxic add -t latency -a latency=1000 dendrite-proxy
37
+ $ toxiproxy-cli toxic add -t bandwidth -a rate=100 dendrite-proxy
38
+ ````
39
+
40
+ Run the test script against ` toxiproxy ` ;
41
+
42
+ ```` shell
43
+ $ SLOW_NETWORK=true ./integration_test/run_matrix_tests.sh
44
+ ````
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ void main() {
27
27
const testPasswordEnv = 'TEST_PASSWORD' ;
28
28
const testSlowNetworkEnv = 'SLOW_NETWORK' ;
29
29
30
+ const testSlowNetwork = bool .fromEnvironment (testSlowNetworkEnv);
31
+
30
32
if (! const bool .hasEnvironment (testUserEnv1)) {
31
33
debugPrint ('TEST_USER1 not defined!!! Run via run_matrix_tests.sh' );
32
34
exit (1 );
@@ -42,7 +44,9 @@ void main() {
42
44
43
45
const testHomeServer = bool .hasEnvironment (testServerEnv)
44
46
? String .fromEnvironment (testServerEnv)
45
- : 'http://localhost:8008' ;
47
+ : testSlowNetwork
48
+ ? 'http://localhost:18008'
49
+ : 'http://localhost:8008' ;
46
50
const testPassword = bool .hasEnvironment (testPasswordEnv)
47
51
? String .fromEnvironment (testPasswordEnv)
48
52
: '?Secret123@!' ;
@@ -59,7 +63,7 @@ void main() {
59
63
password: testPassword,
60
64
);
61
65
62
- const delayFactor = bool .hasEnvironment (testSlowNetworkEnv) ? 10 : 1 ;
66
+ const delayFactor = bool .hasEnvironment (testSlowNetworkEnv) ? 5 : 1 ;
63
67
64
68
setUpAll (() async {
65
69
setFakeDocumentsPath ();
Original file line number Diff line number Diff line change @@ -15,5 +15,7 @@ cd ../dendrite/build/docker/config || exit
15
15
cd - > /dev/null || exit
16
16
17
17
fvm flutter test integration_test/matrix_service_test.dart \
18
- --dart-define=TEST_USER1=" @$TEST_USER1 :localhost" \
19
- --dart-define=TEST_USER2=" @$TEST_USER2 :localhost"
18
+ --dart-define=TEST_USER1=" @$TEST_USER1 :localhost" \
19
+ --dart-define=TEST_USER2=" @$TEST_USER2 :localhost" \
20
+ --dart-define=SLOW_NETWORK=" $SLOW_NETWORK "
21
+
You can’t perform that action at this time.
0 commit comments