History | View | Annotate | Download (7.6 kB)
Remove multiple uses of '.&&.' with conjoin
This is just a bit of cleanup. The (.&&.) operator is internally just:
a .&& b = conjoin [a, b]
so let's replace 'a .&&. b .&&. c .&&. d' directly with 'conjoin [a,b, c, d]'.
Signed-off-by: Iustin Pop <iustin@google.com>...
Fix arbitrary ConfigData object generation
The Cluster object, as it is defined right now, has many '[String]'members, which means that in a standard arbitrary generator these willbecome very big, which is the reason for the current slowness of thetest 'Config_serialisation'....
Remove the slow/fast tests functionality
Since the recent commits improved the speed of the two "slow" testgroups to regular test speed, we can remove this kludge and simplifysignificantly our test runner, yay!
Further hlint fixes
Commit 2cdaf22, “Re-enable standard hlint warnings”, got it almostright. The only problem is that (confusingly) the default set of hintsis not in HLint.Default, but in HLint.HLint (it includes Default andsome built-ins).
After changing the lint file to correctly include the defaults, we had...
Replace manual arbitrary instances with genArbitrary
There are a few more that could be replaces, once we start usingappropriate (new)types.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Add entire ConfigData serialisation tests
Using the recently-added genArbitrary, we can now implement Arbitraryinstances for even "huge" objects like Cluster, so let's use that toimplement entire ConfigData serialisation tests.
Note that, as we don't have yet proper types for some of the Params...
Add some unittests for node queries
These new tests check that:
- no known fields return unknown- any unknown field returns unknown- the type of the fields is consistent between the getters and the field definition- the length of each result row corresponds with the number of fields...
Add unit test for serialisation of DiskLogicalId and Nodes
Since the DiskLogicalId type is manually serialised/deserialised (seeObjects.hs, `encodeDLid' and `decodeDLId'), let's add a test thatchecks that these are idempotent when combined.
Since we're at it, let's add the same test for Node serialisation,...
Add a test helper for simple JSON serialisation testing
While adding yet another JSON serialisation test, I realised that thiscan be trivially abstracted; hence this patch, replacing both simpleversions (readJSON . showJSON == id) and the standard version (with...
Add Instance serialisations tests
This is not perfect, as for many of the parameters we don't have goodArbitrary instances, but is better than nothing.
Simplify property and test case names
Since we now have separate namespaces due to the multi-file split, wedon't need to keep the name of the module in the property names, as wedon't have so many potential conflicts anymore.
We remove the group prefix handling from TestHelper and simply do a...
Split Rpc tests from QC
This required lots of other code moves, so I created it as astandalone patch.
Split out Objects.hs from QC.hs
This is the first file split out from QC.hs - an easy one, since ithas just one test.
The patch changes the way we build hpc excludes, since now we'll havemany modules that need to be excluded, and hpc doesn't seem to be able...