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

Integration tests flaky in AppVeyor #1429

Closed
lesv opened this issue Nov 27, 2016 · 11 comments
Closed

Integration tests flaky in AppVeyor #1429

lesv opened this issue Nov 27, 2016 · 11 comments
Assignees
Labels
api: bigquery Issues related to the BigQuery API. api: logging Issues related to the Cloud Logging API. api: pubsub Issues related to the Pub/Sub API. api: translation Issues related to the Cloud Translation API API.

Comments

@lesv
Copy link
Contributor

lesv commented Nov 27, 2016

#1421 AppVeyor failed on DNS for this, succeeded for Travis, I'm going to approve this.

Tests run: 35, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.391 sec <<< FAILURE! - in com.google.cloud.dns.testing.LocalDnsHelperTest
testListRecordSets(com.google.cloud.dns.testing.LocalDnsHelperTest)  Time elapsed: 0.032 sec  <<< FAILURE!
java.lang.AssertionError
	at com.google.cloud.dns.testing.LocalDnsHelperTest.testListRecordSets(LocalDnsHelperTest.java:822)

    assertNull(record.getType());
    assertNotNull(record.getTtl());
    assertNull(listResult.pageToken());

getTtl() appears to be Null.

@garrettjonesgoogle
Copy link
Member

This seems to have been happening on every PR.

@garrettjonesgoogle
Copy link
Member

We need to either fix the test or stop making this part of the build; it looks really bad to have a Beta product whose builds are failing. /cc @omaray

@garrettjonesgoogle garrettjonesgoogle added the api: dns Issues related to the Cloud DNS API. label Dec 1, 2016
@pongad
Copy link
Contributor

pongad commented Dec 4, 2016

I'll look into this.

@pongad
Copy link
Contributor

pongad commented Dec 5, 2016

@garrettjonesgoogle I think this test file should simply be deleted. The goal of this repo is to create good client libraries. This file is not testing the DNS library. It's testing the DNS emulator, which was written just to test the client.

I think the emulator is a maintenance burden. It's an HTTP server, meaning it has to deal with synchronization. It also tries to behave like the DNS service. Arguably, it's more complicated than the code it's trying to test.

It's much easier to test the library by making sure that method calls create the right RPC requests and that RPC responses gets translated to the right response objects. We can integration test by calling a couple methods on the real service to make sure we set up HTTP and Auth layers properly. I think this would lead to much better tests.

@garrettjonesgoogle
Copy link
Member

I looked through more of the AppVeyor failures. It does look like about half are the particular failure mentioned by @lesv , but I also see other ones too. They occur in ITTranslateTest, ITLoggingTest, LocalPubSubHelperTest, ITBigQueryTest, and BlockingProcessStreamReaderTest. So, just disabling LocalDnsHelperTest won't help. @mziccard , any insights? It seems like there is probably a fair amount of work necessary to work through all of the failures happening.

testListSupportedLanguagesWithOptions(com.google.cloud.translate.it.ITTranslateTest)  Time elapsed: 0.594 sec  <<< ERROR!
com.google.cloud.translate.TranslateException: 
400 Bad Request
{
  "error": {
    "code": 400,
    "message": "The API Key and the authentication credential are from different projects.",
    "errors": [
      {
        "message": "The API Key and the authentication credential are from different projects.",
        "domain": "global",
        "reason": "badRequest"
      }
    ],
    "status": "INVALID_ARGUMENT"
  }
}
	at com.google.cloud.translate.it.ITTranslateTest.testListSupportedLanguagesWithOptions(ITTranslateTest.java:66)
testListRecordSetsBatch(com.google.cloud.dns.testing.LocalDnsHelperTest)  Time elapsed: 0.078 sec  <<< FAILURE!
java.lang.AssertionError
	at com.google.cloud.dns.testing.LocalDnsHelperTest.testListRecordSetsBatch(LocalDnsHelperTest.java:2149)
testWriteAndListLogEntries(com.google.cloud.logging.it.ITLoggingTest)  Time elapsed: 2.484 sec  <<< FAILURE!
java.lang.AssertionError
testStartStopReset(com.google.cloud.pubsub.testing.LocalPubSubHelperTest)  Time elapsed: 0.937 sec  <<< FAILURE!
java.lang.AssertionError: Expected test to throw an instance of com.google.cloud.pubsub.PubSubException
testCreateAndGetJob(com.google.cloud.bigquery.it.ITBigQueryTest)  Time elapsed: 6.424 sec  <<< FAILURE!
java.lang.AssertionError
	at com.google.cloud.bigquery.it.ITBigQueryTest.testCreateAndGetJob(ITBigQueryTest.java:814)
org.junit.runners.model.TestTimedOutException: test timed out after 10 seconds
	at com.google.cloud.testing.BlockingProcessStreamReaderTest.testForwardLogEntry(BlockingProcessStreamReaderTest.java:99)

@garrettjonesgoogle garrettjonesgoogle added api: bigquery Issues related to the BigQuery API. api: logging Issues related to the Cloud Logging API. api: pubsub Issues related to the Pub/Sub API. api: translation Issues related to the Cloud Translation API API. labels Dec 5, 2016
@garrettjonesgoogle
Copy link
Member

It looks like the DNS test in particular is so problematic because we have a DNS emulator that lives within google-cloud-java. It doesn't seem like a good idea for us to be maintaining our own emulator for someone else's service. I'm in favor of nuking it.

@pongad pongad self-assigned this Dec 7, 2016
@garrettjonesgoogle garrettjonesgoogle changed the title Flaky DNS test found in AppVeyor Integration tests flaky in AppVeyor Dec 8, 2016
@garrettjonesgoogle
Copy link
Member

New information: the AppVeyor configuration is set to run integration tests on commits, but not PRs. No AppVeyor run that included integration tests has gotten past the Translate failure, so that needs to be fixed. I am switching AppVeyor to only run unit tests for now because the integration tests are not currently providing value.

#1461

@garrettjonesgoogle
Copy link
Member

It looks like users are seeing the Translate failure outside of integration tests: #1405

@garrettjonesgoogle
Copy link
Member

At this point, AppVeyor isn't even running tests - the queue is very backlogged.

@garrettjonesgoogle
Copy link
Member

We should get AppVeyor integration tests up and running again for GA.

@garrettjonesgoogle garrettjonesgoogle added testing and removed triaged for beta api: dns Issues related to the Cloud DNS API. labels Mar 10, 2017
@garrettjonesgoogle garrettjonesgoogle assigned neozwu and unassigned pongad Mar 23, 2017
@neozwu
Copy link
Contributor

neozwu commented Apr 19, 2017

With this PR, this issue should be resolved.

@neozwu neozwu closed this as completed Apr 19, 2017
github-actions bot pushed a commit that referenced this issue Aug 9, 2022
…datatransfer to v2.3.2 (#1429)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-bigquerydatatransfer](https://togithub.com/googleapis/java-bigquerydatatransfer) | `2.2.4` -> `2.3.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigquerydatatransfer/2.3.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigquerydatatransfer/2.3.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigquerydatatransfer/2.3.2/compatibility-slim/2.2.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigquerydatatransfer/2.3.2/confidence-slim/2.2.4)](https://docs.renovatebot.com/merge-confidence/) |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost.

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigquerydatatransfer).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xMzUuMSIsInVwZGF0ZWRJblZlciI6IjMyLjEzNS4xIn0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the BigQuery API. api: logging Issues related to the Cloud Logging API. api: pubsub Issues related to the Pub/Sub API. api: translation Issues related to the Cloud Translation API API.
Projects
None yet
Development

No branches or pull requests

5 participants