@@ -24,7 +24,7 @@ const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
24
24
25
25
// This loop will run until the environment variables are available
26
26
const waitForEnvVariables = async ( ) => {
27
- while ( ! process . env . MAIN_ENDPOINT || ! process . env . REMOTE_ENDPOINT || ! process . env . ID || ! process . env . CANARY_TYPE ) {
27
+ while ( ! process . env . MAIN_ENDPOINT || ! process . env . REMOTE_ENDPOINT || ! process . env . ID ) {
28
28
console . log ( 'Environment variables not set. Waiting for 10 seconds...' ) ;
29
29
await sleep ( 10000 ) ; // Wait for 10 seconds
30
30
}
@@ -37,7 +37,6 @@ const trafficGenerator = async (interval) => {
37
37
const mainEndpoint = process . env . MAIN_ENDPOINT ;
38
38
const remoteEndpoint = process . env . REMOTE_ENDPOINT ;
39
39
const id = process . env . ID ;
40
- const canaryType = process . env . CANARY_TYPE
41
40
42
41
let urls = [
43
42
`http://${ mainEndpoint } /outgoing-http-call` ,
@@ -46,24 +45,6 @@ const trafficGenerator = async (interval) => {
46
45
`http://${ mainEndpoint } /client-call`
47
46
] ;
48
47
49
- if ( canaryType === 'java-eks' || canaryType === 'python-eks' ) {
50
- urls . push ( `http://${ mainEndpoint } /mysql` )
51
- }
52
-
53
- // Need to call some APIs so that it exceeds the metric limiter threshold and make the test
54
- // APIs generate AllOtherOperations metric. Sleep for a minute to let cloudwatch service process the API call
55
- // Calling it here before calling the remote sample app endpoint because the API generated by it is validated
56
- // for AllOtherRemoteOperations in the metric validation step
57
- if ( canaryType === 'java-metric-limiter' ) {
58
- const fakeUrls = [
59
- `http://${ mainEndpoint } ` ,
60
- `http://${ mainEndpoint } /fake-endpoint`
61
- ]
62
- // Send the fake requests and wait a minute
63
- await sendRequests ( fakeUrls ) ;
64
- await sleep ( 60000 ) ;
65
- }
66
-
67
48
await sendRequests ( urls ) ;
68
49
setInterval ( ( ) => sendRequests ( urls ) , interval ) ;
69
50
}
0 commit comments