Client process exists asynchronously, so may not have finished exiting by
the next test. Therefore use a different name in each test as name does
not need to be the same.
Process.alive?/1 returns false once a process begins to die. This is asynchronous and
everything when a process exits costs reduction. One part of this is unregistering
the process's name.
* Remove dependency on 'thrift' compiler and Erlang runtime
* Make some functions defp, remove some travis config, and moduletag
* Rename test/static to test/data
* Serialized maps/sets are non-deterministic, so we should not compare directly to the serialized data files
* Add python script for generating test data
* Minor python cleanups
These benchmarks are based on a direct comparison to the Apache Thift
Erlang implementation from several Elixir versions ago.
We're also in the process of removing our Erlang runtime coupling (#323)
which will make it difficult to continue maintaining these benchmarks in
their current form.
- build the schema using a single merge/2 reduction
- path can be nil when we're parsed from an in-memory string
- remove the `model` type that isn't doing much for us
- remove the unused `thrift_namespace` field
* Quelled compile warnings under 1.6
* Allowed ranch transport opts to be specified
In Elixir 1.6, there's a preference for catch to come before rescue
This moves the nested Models into a more distinct top-level namespace.
There aren't any functional changes here, but it prefaces future work to
better define the parsed (AST) representation of a Thrift file.
* Handle special floats like NaN, inf, -inf
* Add NaN struct
* Write large number with underscores
* Move Thrift.NaN and remove unnecessary function clause
* Follow consistent code style
Thrift uses the `namespace` keyword to define a language's namespace.
namespace elixir Thrift.Namespace
Unfortunately, the Apache Thrift compiler will produce a warning on this
line because it doesn't recognize `elixir` as a supported language.
While that warning is benign, it can be annoying. For that reason, you
can also specify your Elixir namespace as a "magic" namespace comment:
#@namespace elixir Thrift.Namespace
This alternate syntax is borrowed from Scrooge, which uses the same
trick for defining `scala` namespaces.
Also remove the Elixir 1.6 / OTP 20.3 entry from the matrix to speed up
our CI builds a bit more. That isn't a unique-enough combination to
justify its own testing environment.
Previously all backends were removed which would hide all logs. This
is quite inconvenient if a test fails. Capture log will only show
output for failed tests (grouped and inline with each test failure).
Do not log expected errors (tcp socket will always close eventually).
Elixir 1.6's ExUnit implementation changed such that setup_all's
`context` now contains a `:module` key instead of a `:case` key.
Backwards compatibility was intended, but it looks like the ExUnit
runner now only passes `:module`.
Elixir 1.6 is allowed to fail for now.
Also, switch version syntax to just specify the minor (but not patch)
version. Travis will also use the latest know patch release in this
case.
This is more consistent with Elixir's own naming conventions. It also
removes a small amount of ambiguity with code that refers to Thrift's
exceptions; that is, things named "exceptions" in this library are
nearly all Thrift exceptions.
This test has been flaky because it relies on race conditions.
Force synchronization using :sys.get_state/1 and remove
assertions that can't be guaranteed.
- We don't need the fullly-qualified service module because we're
already generating code within it. This improves readability and
cuts down on the overall size of the generated source file.
- Just use unquote/1 in the response handler macros to reduce the
amount of generated code that was being produced by bind_quoted.