julianghionoiu / dpnt-coverage

Collect coverage from SRCS files
0 stars 0 forks source link

A number of issues when running commands mentioned in the README #20

Closed neomatrix369 closed 6 years ago

neomatrix369 commented 6 years ago

Run the acceptance test

./gradlew --rerun-tasks test jacocoTestReport

The above does not work - jacocoTestReport is not a known task


Running

./gradlew --rerun-tasks test

or

./gradlew clean test shadowJar

leads to the same test failure:


Thu Aug 16 17:08:13 2018 [DEBUG] Request body: 
{"cluster":"local-test-cluster","taskDefinition":"accelerate-io/dpnt-coverage-hmmm","overrides":{"containerOverrides":[{"name":"default-container","environment":[{"name":"PARTICIPANT_ID","value":"b323d11fbfcf442a9aaf6377a64e9f5d"},{"name":"REPO","value":"s3://localbucket/TCH/b323d11fbfcf442a9aaf6377a64e9f5d/file.srcs"},{"name":"CHALLENGE_ID","value":"TCH"},{"name":"ROUND_ID","value":"TCH_R2"},{"name":"TAG","value":"TCH_R2/done"}]}]},"launchType":"FARGATE","networkConfiguration":{"awsvpcConfiguration":{"subnets":["local-subnet-x"],"securityGroups":["sg-local-security"],"assignPublicIp":"ENABLED"}}}
Thu Aug 16 17:08:13 2018 [INFO] Executing command: docker image inspect --format='{{.Container}}' accelerate-io/dpnt-coverage-hmmm:latest
'0c564afacb53597a991a763b5b380fa106e5105782a93509e6534f7fc6fa3c71'
Thu Aug 16 17:08:13 2018 [INFO] Executing command: docker run --detach --env SQS_QUEUE_URL=http://host.docker.internal:9324/queue/participant-events --env ECS_TASK_CLUSTER_ARN=arn:aws:ecs:eu-west-1:577770582757:cluster/dpnt-coverage-cluster --env ECS_VPC_ASSIGN_PUBLIC_IP=ENABLED --env S3_BUCKET_ARN=arn:local:::tdl-official-videos --env ECS_TASK_DEFINITION_PREFIX=accelerate-io/dpnt-coverage- --env SQS_QUEUE_ARN=arn:local:::participant-events --env S3_ENDPOINT=http://host.docker.internal:9000 --env AWS_ACCESS_KEY_ID=local_test_access_key --env SQS_REGION=elasticmq --env SQS_ENDPOINT=http://host.docker.internal:9324 --env ECS_TASK_LAUNCH_TYPE=FARGATE --env ECS_ENDPOINT=http://host.docker.internal:9988 --env ECS_VPC_SUBNET=local-subnet-x --env S3_REGION=us-east-1 --env ECS_REGION=local --env AWS_SECRET_ACCESS_KEY=local_test_secret_key --env ECR_BASE_URL=local_docker_registry --env ECS_TASK_CLUSTER=local-test-cluster --env ECS_VPC_SECURITY_GROUP=sg-local-security --env PARTICIPANT_ID=b323d11fbfcf442a9aaf6377a64e9f5d --env REPO=s3://localbucket/TCH/b323d11fbfcf442a9aaf6377a64e9f5d/file.srcs --env CHALLENGE_ID=TCH --env ROUND_ID=TCH_R2 --env TAG=TCH_R2/done accelerate-io/dpnt-coverage-hmmm:latest
ef64d3e1e9c920cbfb65f7b5feebe779a02bff8b5cda311a62ab149a8e396b3f
:test

tdl.datapoint.coverage.CoverageDatapointAcceptanceTest > create_repo_and_uploads_commits FAILED
    java.lang.AssertionError at CoverageDatapointAcceptanceTest.java:121

7 tests completed, 1 failed
:test FAILED

As the shadowJar cannot be created above, the remaining steps, i.e.

serverless deploy --stage dev

or

SLS_DEBUG=* serverless deploy --stage dev

Do not finish successfully.

neomatrix369 commented 6 years ago

I'll debug the failing test, but any additional hints will help fix these issues

julianghionoiu commented 6 years ago

It is worth investigating. My gut feeling is that the create_repo_and_uploads_commits if flaky as it asynchronously waits for messages to be present on the destination queue.

neomatrix369 commented 6 years ago

Hmmm flaky tests! Ok will feedback with outcome of investigation

neomatrix369 commented 6 years ago

dpnt-coverage/src/test/java/tdl/datapoint/coverage/CoverageDatapointAcceptanceTest.java:141:

    private static void waitForQueueToReceiveEvents() throws InterruptedException {
        Thread.sleep(10000);
    }

might be the cause of it, isn't there a callback method to trigger this?

julianghionoiu commented 6 years ago

It runs on a separate thread so test test will have to set a timeout regardless On Thu, 16 Aug 2018 at 21:58, mani notifications@github.com wrote:

private static void waitForQueueToReceiveEvents() throws InterruptedException {
    Thread.sleep(10000);
}

might be the cause of it, isn't there a callback method to trigger this?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/julianghionoiu/dpnt-coverage/issues/20#issuecomment-413682494, or mute the thread https://github.com/notifications/unsubscribe-auth/AE2qKdeqrXpmqLSeBJ25LB-wmNLtrUIdks5uRdzcgaJpZM4WAJwT .

neomatrix369 commented 6 years ago

I found that the reason its failing now:

Exception in thread "Thread-1" java.lang.IllegalStateException: Connection pool shut down
    at org.apache.http.util.Asserts.check(Asserts.java:34)
    at org.apache.http.pool.AbstractConnPool.lease(AbstractConnPool.java:191)
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.requestConnection(PoolingHttpClientConnectionManager.java:267)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.amazonaws.http.conn.ClientConnectionManagerFactory$Handler.invoke(ClientConnectionManagerFactory.java:76)
    at com.amazonaws.http.conn.$Proxy9.requestConnection(Unknown Source)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:176)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
    at com.amazonaws.http.apache.client.impl.SdkHttpClient.execute(SdkHttpClient.java:72)
    at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1238)
    at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1058)
    at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:743)
    at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:717)
    at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:699)
    at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:667)
    at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:649)
    at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:513)
    at com.amazonaws.services.sqs.AmazonSQSClient.doInvoke(AmazonSQSClient.java:2013)
    at com.amazonaws.services.sqs.AmazonSQSClient.invoke(AmazonSQSClient.java:1989)
    at com.amazonaws.services.sqs.AmazonSQSClient.executeReceiveMessage(AmazonSQSClient.java:1471)
    at com.amazonaws.services.sqs.AmazonSQSClient.receiveMessage(AmazonSQSClient.java:1447)
    at tdl.participant.queue.connector.SqsEventQueue$MessageProcessingThread.processBatch(SqsEventQueue.java:141)
    at tdl.participant.queue.connector.SqsEventQueue$MessageProcessingThread.run(SqsEventQueue.java:123)

which happens to be due to java.lang.IllegalStateException: Connection pool shut down in queue-client/0.1.17/3588f86b4f2cd5d5e0b8164da95e112c367512a7/queue-client-0.1.17-sources.jar!/tdl/participant/queue/connector/SqsEventQueue.java:141

neomatrix369 commented 6 years ago

ShadowJar builds without test failures