Skip to content

Conversation

Timandes
Copy link
Contributor

Thanks to @ryanuber 's Pull request #28.

We need more tests after merging.

@andreiz
Copy link
Owner

andreiz commented May 27, 2015

We should probably bump the version significantly, because exceptions will most likely mean people need to modify their code for it to continue functioning.

@faabiosr
Copy link
Contributor

I agree with you @andreiz!
@Timandes , is very important that you make tests for this PR.

@faabiosr
Copy link
Contributor

@andreiz How we could resolve this issue about version in pecl repository?

@andreiz
Copy link
Owner

andreiz commented May 27, 2015

We update the version here, then build a PECL tarball and upload it.

@faabiosr
Copy link
Contributor

Awesome @andreiz !
Please, don't build the package now, wait @Timandes make tests.

@andreiz
Copy link
Owner

andreiz commented May 27, 2015

I'm not building anything until this is merged in.

@faabiosr
Copy link
Contributor

👍

@Timandes
Copy link
Contributor Author

@fabiorphp I'm not good at writing test case(maybe because i'm not good at english). Could you guide me to do this?

@faabiosr
Copy link
Contributor

Of course! I'm here to help you.

Before we start, please look at the tests that are already created. The tests are very easy.

@Timandes
Copy link
Contributor Author

OK, i'll start with existing case.
I saw a lot of fails on travis-ci.....

@faabiosr
Copy link
Contributor

It's normal. If you prefer run in your machine, please look the dev-tools folder.

I recommend that you install the Zookeeper server for you create integration tests.

@faabiosr
Copy link
Contributor

Let us wait the @andreiz integrating the repository with Travis-CI and Coveralls, it's more easy to approve pull-requests

@Timandes
Copy link
Contributor Author

@fabiorphp Wait a moment.
I found some compiling errors under PHP with ZTS enabled.

@Timandes
Copy link
Contributor Author

done : )

@faabiosr
Copy link
Contributor

I will test soon.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the tests must be more simple.
E.g:

--TEST--
Should throw exception when check if node exists without connect
--SKIPIF--
<?php
if (!extension_loaded('zookeeper')) {
    echo 'Zookeeper extension is not loaded'
};
--FILE--
<?php
$client = new Zookeeper();
try {
    $client->exists('/test1');
} catch(Exception $e) {
    echo $e->getMessage() . "\n" . $e->getCode();
}
--EXPECT--
Zookeeper->connect() was not called
5998

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does --EXPECT-- part support PHP code?

like:

--EXPECT--
Zookeeper->connect() was not called
<?php echo Zookeeper::CONNECT_NOT_CALLED; ?>

I'm worried about future changing of constant value.

Is this my over-worriness?

Copy link
Contributor

Choose a reason for hiding this comment

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

Please, see these docs bellow and be a monster in making tests!

https://qa.php.net/write-test.php
https://qa.php.net/phpt_details.php

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Monster +_+....

@Timandes
Copy link
Contributor Author

Timandes commented Jun 1, 2015

Done.

@faabiosr
Copy link
Contributor

faabiosr commented Jun 1, 2015

Well, @Timandes all tests passed!
Now, we wait @andreiz merge this PR.

@andrei look at the Travis-CI integration guide:
http://docs.travis-ci.com/user/getting-started/

@faabiosr
Copy link
Contributor

Anything new?

@andreiz
Copy link
Owner

andreiz commented Jun 15, 2015

Sorry, I'll try to do this today.

On Mon, Jun 15, 2015 at 3:28 AM, Fábio da Silva Ribeiro <
[email protected]> wrote:

Anything new?


Reply to this email directly or view it on GitHub
#59 (comment).

@faabiosr
Copy link
Contributor

Awesome @andreiz 👍

@andreiz
Copy link
Owner

andreiz commented Jun 16, 2015

So what should go into .travis.yml file, just this?

language: php
php:

  • 5.4
  • 5.5
  • 5.6

On Mon, Jun 15, 2015 at 10:56 AM, Fábio da Silva Ribeiro <
[email protected]> wrote:

Awesome @andreiz https://github.com/andreiz [image: 👍]


Reply to this email directly or view it on GitHub
#59 (comment).

@faabiosr
Copy link
Contributor

The Travis file was created and is on the master branch:
https://github.com/andreiz/php-zookeeper/blob/master/.travis.yml.

You should only enable for this repo.

@andreiz
Copy link
Owner

andreiz commented Jun 18, 2015

I enabled the TravisCI integration and kicked off a build.

On Tue, Jun 16, 2015 at 2:09 PM, Fábio da Silva Ribeiro <
[email protected]> wrote:

The Travis file was created and is on the master branch:
https://github.com/andreiz/php-zookeeper/blob/master/.travis.yml.

You should only enable for this repo.


Reply to this email directly or view it on GitHub
#59 (comment).

@faabiosr
Copy link
Contributor

Awesome! 👍

The next step is enable Coveralls for coverage!

@faabiosr
Copy link
Contributor

@Timandes Can you make push --force for run Travis-CI integration?

@Timandes
Copy link
Contributor Author

@fabiorphp How should i do that?

@faabiosr
Copy link
Contributor

It is simple!
Use commit ammend and after that, push force

@Timandes
Copy link
Contributor Author

$ git push --force
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:

  git config --global push.default matching

To squelch this message and adopt the new behavior now, use:

  git config --global push.default simple

See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)

Username for 'https://github.com': Timandes
Password for 'https://[email protected]':
Everything up-to-date

I'm not sure that i did a right thing ...

@faabiosr
Copy link
Contributor

Well, is git push push -f origin master in you repo.

Be careful!

@Timandes
Copy link
Contributor Author

Is there anything else i can do?

@faabiosr
Copy link
Contributor

Not know. We will wait the @andreiz decide.

@Timandes
Copy link
Contributor Author

You never sleep? ...
Why do i always see you online whenever i'm online?...

@faabiosr
Copy link
Contributor

Never sleep. Sleep is for the weak.

@Timandes
Copy link
Contributor Author

洗洗睡吧……

php_zookeeper.h Outdated
Copy link
Owner

Choose a reason for hiding this comment

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

Where is PHPZK_ADDITIONAL_CONSTANTS ever defined?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe it's useless.
Should I remove it?

@Timandes
Copy link
Contributor Author

Log from Travis-CI:

--2015-06-30 01:10:19--  (try:20)  http://apache.fayea.com/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz
Connecting to apache.fayea.com (apache.fayea.com)|119.6.56.18|:80... failed: Connection timed out.
Giving up.

Should I change mirror of Zookeeper package?

@Timandes
Copy link
Contributor Author

Timandes commented Jul 4, 2015

Is there anything more I can do?

@faabiosr
Copy link
Contributor

Something new guys?

@Timandes
Copy link
Contributor Author

Hope so.

@andreiz
Copy link
Owner

andreiz commented Jul 13, 2015

Is this ready to be merged then?

@Timandes
Copy link
Contributor Author

👌

@faabiosr
Copy link
Contributor

Yep!

@faabiosr
Copy link
Contributor

faabiosr commented Aug 5, 2015

Something new guys?

@faabiosr
Copy link
Contributor

faabiosr commented Sep 7, 2015

Something new guys? Or that PR will stand still as the other PR #28

@faabiosr
Copy link
Contributor

Can I merge this request? I have permission to do that.

andreiz added a commit that referenced this pull request Sep 15, 2015
@andreiz andreiz merged commit 34d2de1 into andreiz:exceptions Sep 15, 2015
@andreiz
Copy link
Owner

andreiz commented Sep 15, 2015

I'll bump the version and make a release.

@Timandes Timandes deleted the exceptions branch September 16, 2015 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants