Skip to content
This repository has been archived by the owner on May 12, 2018. It is now read-only.

Mock gpb and protobuffs, in inttest, replacing external dependencies #420

Merged

Conversation

tomas-abrahamsson
Copy link
Contributor

I've seen recently a few cases where the rebar build failed due to failure to retrieve external dependencies. The dependencies were to gpb and to protobuffs. This pull request replaces those external dependencies with mocks. As a results, the builds should be more stable and faster. The mocks turned out to be only a few lines of code. I believe these two external dependencies are the only such dependencies in the tests.

Those dependencies were introduced when #203 was merged, and evidence of build failures can be seen in the discussions in #413 and #419.

@tomas-abrahamsson
Copy link
Contributor Author

Hmm... The build failure appears to be unrelated.

"Can't set long node name!\nPlease check your configuration\n"

@ghost
Copy link

ghost commented Jan 2, 2015

Yeah, something appears to have changed on travis-ci. Related: http://www.erlang.org/pipermail/erlang-questions/2015-January/082344.html.

@ferd
Copy link
Contributor

ferd commented Jan 5, 2015

This sounds sane to me. If Tuncer agrees or whatever, I'll just run the tests locally and see if it's mergeable until Travis fix their networks or we adapt our tests to it.

@ghost
Copy link

ghost commented Jan 5, 2015

+1

In inttest/proto_gpb, replace the external dependency to gpb, a
protocol buffer compiler, with a simple mock.

The mock provides enough of what is needed for inttest only,
which is to generate some dummy content, but with proper file names.

As a result, the increased timeout for the proto_gpb inttest should no
longer be needed (inttest/proto_gpb/retest.config), both since the
mock is now much faster to compile, and since any network bandwidth or
connectivity issues have now been eliminated.
In inttest/proto_protobuffs, replace the external dependency to
erlang_protobuffs, a protocol buffer compiler, with a simple mock.

The mock provides enough of what is needed for inttest only,
which is to generate some dummy content, but with proper file names.
@tomas-abrahamsson tomas-abrahamsson force-pushed the mock-gpb-and-protobuffs-in-inttest branch from 6ce3eb7 to 2af51af Compare January 7, 2015 17:28
@tomas-abrahamsson
Copy link
Contributor Author

Updated: fixed a superfluous empty line

@ferd
Copy link
Contributor

ferd commented Jan 7, 2015

This appeared to work well for me too, local tests passed. Merging.

ferd added a commit that referenced this pull request Jan 7, 2015
…s-in-inttest

Mock gpb and protobuffs, in inttest, replacing external dependencies
@ferd ferd merged commit d242472 into rebar:master Jan 7, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants