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

fixed issue #90: separated the unpacked programs for versions #92

Merged
merged 4 commits into from
Jul 19, 2017
Merged

fixed issue #90: separated the unpacked programs for versions #92

merged 4 commits into from
Jul 19, 2017

Conversation

BorzdeG
Copy link
Contributor

@BorzdeG BorzdeG commented Jul 15, 2017

No description provided.


public class TestMultipleInstance {
@Test
public void testRunTwoConsistentlyInstanceDifferenceVersions() throws Exception {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"test" prefix in the method name is actually redundant. Let's call them in accordance with the check, which they perform (e.g. "itShouldAllowToRunTwoInstancesWithDifferentVersions")

public void testRunTwoConsistentlyInstanceDifferenceVersions() throws Exception {
final EmbeddedPostgres postgres0 = new EmbeddedPostgres();
postgres0.start();
Assert.assertTrue(postgres0.getConnectionUrl().isPresent());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use hamcrest matchers here, as they give much more detailed feedback.

"pgsql" + "-" + distribution.getVersion().asInDownloadPath(), "bin");
if (dir.exists()
&& dir.isDirectory()
&& filesSet.entries().stream().allMatch(entry -> exists(path))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I can see that this condition was created incorrectly. In fact it is redundant and can be safely replaced with exists(path).

Victor Alenkov (victor@alenkov.name) added 3 commits July 18, 2017 17:52
0) change tests naming strategy
0) change tests - using hamcrest matchers
0) Removed redundant check
@smecsia smecsia merged commit 6355501 into yandex-qatools:master Jul 19, 2017
smecsia pushed a commit to smecsia/postgresql-embedded that referenced this pull request Jul 21, 2017
…rsions (yandex-qatools#92)

* fixed issue yandex-qatools#90: separated the unpacked programs for versions

* issue yandex-qatools#41:
0) change tests naming strategy

* issue yandex-qatools#41:
0) change tests - using hamcrest matchers

* issue yandex-qatools#41:
0) Removed redundant check
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