RE: question on running cassandra-dtests
Hi Ariel, Yes, it is Linux. I checked Cassandra paths in the env output, looks fine to me. Attached is the complete output of both commands: pip list and env. Will try keep-test-dir option as well. Thanks, Preetika -Original Message- From: Ariel Weisberg [mailto:ar...@weisberg.ws] Sent: Wednesday, March 28, 2018 2:38 PM To: dev@cassandra.apache.org Subject: Re: question on running cassandra-dtests Hi, Looks like you are running on Linux? From inside your virtualenv can you run pip list? Can you also give us the output of "env"? Looking at the error you got "NoSuchMethod" it suggests that the Cassandra you pointed to has inconsistent class files and jars or they change during the test. It's statically compiled so it shouldn't be able to build with methods that can't be resolved at runtime. It can still happen if the libraries provided at runtime aren't the same as the ones provided at compile time. It might help to run with --keep-test-dir and then check the test directory for Cassandra logs and review the classpath to make sure everything Cassandra is being loaded up with makes sense. Ariel On Wed, Mar 28, 2018, at 5:09 PM, Tyagi, Preetika wrote: > I'm able to setup and run dtest now, however, I do see a lot of failures. > > For example, I tried running "pytest > --cassandra-dir= home> > nodetool_test.py::TestNodetool::test_correct_dc_rack_in_nodetool_info" > and below is the snippet of errors: > > platform linux -- Python 3.5.2, pytest-3.5.0, py-1.5.3, pluggy-0.6.0 > rootdir: /home//cassandra-dtest, inifile: > pytest.ini > plugins: timeout-1.2.1, flaky-3.4.0 > collected 1 item > > > > > nodetool_test.py E > > > > [100%]FE [100%] > > == > = > ERRORS > == > == > __ > _ ERROR at teardown of > TestNodetool.test_correct_dc_rack_in_nodetool_info > __ > _ Unexpected error found in node logs (see > stdout for full details). > Errors: [ERROR [MessagingService-NettyOutbound-Thread-4-1] 2018-03-28 > 00:24:36,784 OutboundHandshakeHandler.java:209 - Failed to properly > handshake with peer 127.0.0.1:7000 (GOSSIP). Closing the channel. > java.lang.NoSuchMethodError: > org.apache.cassandra.net.async.OutboundConnectionIdentifier.connection > Address()Ljava/ > net/InetSocketAddress; > at > org.apache.cassandra.net.async.OutboundHandshakeHandler.channelActive( > OutboundHandshakeHandler.java:107) > ~[main/:na] > at > io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(Abs > tractChannelHandlerContext.java:213) > [netty-all-4.1.14.Final.jar:4.1.14.Final] > at > io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(Abs > tractChannelHandlerContext.java:199) > [netty-all-4.1.14.Final.jar:4.1.14.Final] > at > io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(Abstr > actChannelHandlerContext.java:192) > [netty-all-4.1.14.Final.jar:4.1.14.Final] > at io.netty.channel.DefaultChannelPipeline > $HeadContext.channelActive(DefaultChannelPipeline.java:1330) [netty- > all-4.1.14.Final.jar:4.1.14.Final] > at > io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(Abs > tractChannelHandlerContext.java:213) > [netty-all-4.1.14.Final.jar:4.1.14.Final] > at > io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(Abs > tractChannelHandlerContext.java:199) > [netty-all-4.1.14.Final.jar:4.1.14.Final] > at > io.netty.channel.DefaultChannelPipeline.fireChannelActive(DefaultChann > elPipeline.java:910) [netty-all-4.1.14.Final.jar:4.1.14.Final] > at io.netty.channel.epoll.AbstractEpollStreamChannel > $EpollStreamUnsafe.fulfillConnectPromise(AbstractEpollStreamChannel.ja > va:855) [netty-all-4.1.14.Final.jar:4.1.14.Final] > at io.netty.channel.epoll.AbstractEpollStreamChannel > $EpollStreamUnsafe.finishConnec
Re: question on running cassandra-dtests
l] > at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:296) > [netty-all-4.1.14.Final.jar:4.1.14.Final] > at io.netty.util.concurrent.SingleThreadEventExecutor > $5.run(SingleThreadEventExecutor.java:858) [netty-all-4.1.14.Final.jar: > 4.1.14.Final] > at io.netty.util.concurrent.DefaultThreadFactory > $DefaultRunnableDecorator.run(DefaultThreadFactory.java:138) [netty- > all-4.1.14.Final.jar:4.1.14.Final] > at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151], ERROR > [MessagingService-NettyOutbound-Thread-4-6] 2018-03-28 00:24:37,061 > OutboundHandshakeHandler.java:209 - Failed to properly handshake with > peer 127.0.0.2:7000 (GOSSIP). Closing the channel. > java.lang.NoSuchMethodError: > org.apache.cassandra.net.async.OutboundConnectionIdentifier.connectionAddress()Ljava/ > net/InetSocketAddress; > at > org.apache.cassandra.net.async.OutboundHandshakeHandler.channelActive(OutboundHandshakeHandler.java:107) > > ~[main/:na] > at > io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:213) > > [netty-all-4.1.14.Final.jar:4.1.14.Final] > at > io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:199) > > [netty-all-4.1.14.Final.jar:4.1.14.Final] > at > io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:192) > > [netty-all-4.1.14.Final.jar:4.1.14.Final] > at io.netty.channel.DefaultChannelPipeline > $HeadContext.channelActive(DefaultChannelPipeline.java:1330) [netty- > all-4.1.14.Final.jar:4.1.14.Final] > at > io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:213) > > [netty-all-4.1.14.Final.jar:4.1.14.Final] > at > io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:199) > > [netty-all-4.1.14.Final.jar:4.1.14.Final] > at > io.netty.channel.DefaultChannelPipeline.fireChannelActive(DefaultChannelPipeline.java:910) > > [netty-all-4.1.14.Final.jar:4.1.14.Final] > at io.netty.channel.epoll.AbstractEpollStreamChannel > $EpollStreamUnsafe.fulfillConnectPromise(AbstractEpollStreamChannel.java:855) > [netty-all-4.1.14.Final.jar:4.1.14.Final] > at io.netty.channel.epoll.AbstractEpollStreamChannel > $EpollStreamUnsafe.finishConnect(AbstractEpollStreamChannel.java:888) > [netty-all-4.1.14.Final.jar:4.1.14.Final] > at io.netty.channel.epoll.AbstractEpollStreamChannel > $EpollStreamUnsafe.epollOutReady(AbstractEpollStreamChannel.java:907) > [netty-all-4.1.14.Final.jar:4.1.14.Final] > at > io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:394) > [netty-all-4.1.14.Final.jar:4.1.14.Final] > at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:296) > [netty-all-4.1.14.Final.jar:4.1.14.Final] > at io.netty.util.concurrent.SingleThreadEventExecutor > $5.run(SingleThreadEventExecutor.java:858) [netty-all-4.1.14.Final.jar: > 4.1.14.Final] > at io.netty.util.concurrent.DefaultThreadFactory > $DefaultRunnableDecorator.run(DefaultThreadFactory.java:138) [netty- > all-4.1.14.Final.jar:4.1.14.Final] > at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151], ERROR > [MessagingService-NettyOutbound-Thread-4-7] 2018-03-28 00:24:37,063 > OutboundHandshakeHandler.java:209 - Failed to properly handshake with > peer 127.0.0.3:7000 (GOSSIP). Closing the channel. > > Can somebody help me figure out how I can run dtests successfully? Once > I am able to do that, I will be able to proceed with the implementation > of tests for the JIRA ticket I'm working on. > > Thanks, > Preetika > > -Original Message- > From: Ariel Weisberg [mailto:ar...@weisberg.ws] > Sent: Tuesday, March 27, 2018 7:15 PM > To: dev@cassandra.apache.org > Subject: Re: question on running cassandra-dtests > > Hi, > > Great! Glad you were able to get up and running. The dtests can be > tricky if you aren't already somewhat familiar with Python. > > Ariel > > On Mon, Mar 26, 2018, at 9:10 PM, Murukesh Mohanan wrote: > > On Tue, Mar 27, 2018 at 6:47 Ariel Weisberg <ar...@weisberg.ws> wrote: > > > > > Hi, > > > > > > Are you deleting the venv before creating it? You shouldn't really > > > need to use sudo for the virtualenv. That is going to make things > > > potentially wonky. Naming it cassandra-dtest might also do something > > > wonky if you have a cassandra-dtest directory already. I usually > > > name it just venv and place it in the same subdir as the require
RE: question on running cassandra-dtests
nnelActive(AbstractChannelHandlerContext.java:199) [netty-all-4.1.14.Final.jar:4.1.14.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:192) [netty-all-4.1.14.Final.jar:4.1.14.Final] at io.netty.channel.DefaultChannelPipeline$HeadContext.channelActive(DefaultChannelPipeline.java:1330) [netty-all-4.1.14.Final.jar:4.1.14.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:213) [netty-all-4.1.14.Final.jar:4.1.14.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:199) [netty-all-4.1.14.Final.jar:4.1.14.Final] at io.netty.channel.DefaultChannelPipeline.fireChannelActive(DefaultChannelPipeline.java:910) [netty-all-4.1.14.Final.jar:4.1.14.Final] at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.fulfillConnectPromise(AbstractEpollStreamChannel.java:855) [netty-all-4.1.14.Final.jar:4.1.14.Final] at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.finishConnect(AbstractEpollStreamChannel.java:888) [netty-all-4.1.14.Final.jar:4.1.14.Final] at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollOutReady(AbstractEpollStreamChannel.java:907) [netty-all-4.1.14.Final.jar:4.1.14.Final] at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:394) [netty-all-4.1.14.Final.jar:4.1.14.Final] at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:296) [netty-all-4.1.14.Final.jar:4.1.14.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [netty-all-4.1.14.Final.jar:4.1.14.Final] at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138) [netty-all-4.1.14.Final.jar:4.1.14.Final] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151], ERROR [MessagingService-NettyOutbound-Thread-4-7] 2018-03-28 00:24:37,063 OutboundHandshakeHandler.java:209 - Failed to properly handshake with peer 127.0.0.3:7000 (GOSSIP). Closing the channel. Can somebody help me figure out how I can run dtests successfully? Once I am able to do that, I will be able to proceed with the implementation of tests for the JIRA ticket I'm working on. Thanks, Preetika -Original Message- From: Ariel Weisberg [mailto:ar...@weisberg.ws] Sent: Tuesday, March 27, 2018 7:15 PM To: dev@cassandra.apache.org Subject: Re: question on running cassandra-dtests Hi, Great! Glad you were able to get up and running. The dtests can be tricky if you aren't already somewhat familiar with Python. Ariel On Mon, Mar 26, 2018, at 9:10 PM, Murukesh Mohanan wrote: > On Tue, Mar 27, 2018 at 6:47 Ariel Weisberg <ar...@weisberg.ws> wrote: > > > Hi, > > > > Are you deleting the venv before creating it? You shouldn't really > > need to use sudo for the virtualenv. That is going to make things > > potentially wonky. Naming it cassandra-dtest might also do something > > wonky if you have a cassandra-dtest directory already. I usually > > name it just venv and place it in the same subdir as the requirements file. > > > > Also running sudo is going to create a new shell and then exit the > > shell immediately so when you install the requirements it might be > > doing it not in the venv, but in whatever is going on inside the sudo shell. > > > Yep, looking at the logs, that's probably the issue. When activating a > venv (with `source .../bin/activate`), it sets environment variables > (`PATH`, `PYTHONHOME` etc.) so that the virtualenv's Python, pip are > used instead of the system Python and pip. sudo defaults to using a > clean PATH and resetting most of the user's environment, so the > effects of the venv are lost when running in sudo. > > > The advantage of virtualenv is not needing to mess with system > packages at > > all so sudo is inadvisable when creating, activating, and pip > > installing things. > > > > You might need to use pip3 instead of pip, but I suspect that in a > > correct venv pip is going to point to pip3. > > > > Ariel > > > > On Mon, Mar 26, 2018, at 5:31 PM, Tyagi, Preetika wrote: > > > Yes, that's correct. I followed README and ran all below steps to > > > create virtualenv. Attached is the output of all commands I ran > > > successfully except the last one i.e. pytest. > > > > > > Could you please let me know if you see anything wrong or missing? > > > > > > Thanks, > > > Preetika > > > > > > -Original Message- > > > From: Ariel Weisberg [mailto:ar...@weisberg.ws] > > > Sent: Monda
Re: question on running cassandra-dtests
Hi, Great! Glad you were able to get up and running. The dtests can be tricky if you aren't already somewhat familiar with Python. Ariel On Mon, Mar 26, 2018, at 9:10 PM, Murukesh Mohanan wrote: > On Tue, Mar 27, 2018 at 6:47 Ariel Weisberg <ar...@weisberg.ws> wrote: > > > Hi, > > > > Are you deleting the venv before creating it? You shouldn't really need to > > use sudo for the virtualenv. That is going to make things potentially > > wonky. Naming it cassandra-dtest might also do something wonky if you have > > a cassandra-dtest directory already. I usually name it just venv and place > > it in the same subdir as the requirements file. > > > > Also running sudo is going to create a new shell and then exit the shell > > immediately so when you install the requirements it might be doing it not > > in the venv, but in whatever is going on inside the sudo shell. > > > Yep, looking at the logs, that's probably the issue. When activating a venv > (with `source .../bin/activate`), it sets environment variables (`PATH`, > `PYTHONHOME` etc.) so that the virtualenv's Python, pip are used instead of > the system Python and pip. sudo defaults to using a clean PATH and > resetting most of the user's environment, so the effects of the venv are > lost when running in sudo. > > > The advantage of virtualenv is not needing to mess with system packages at > > all so sudo is inadvisable when creating, activating, and pip installing > > things. > > > > You might need to use pip3 instead of pip, but I suspect that in a correct > > venv pip is going to point to pip3. > > > > Ariel > > > > On Mon, Mar 26, 2018, at 5:31 PM, Tyagi, Preetika wrote: > > > Yes, that's correct. I followed README and ran all below steps to create > > > virtualenv. Attached is the output of all commands I ran successfully > > > except the last one i.e. pytest. > > > > > > Could you please let me know if you see anything wrong or missing? > > > > > > Thanks, > > > Preetika > > > > > > -Original Message- > > > From: Ariel Weisberg [mailto:ar...@weisberg.ws] > > > Sent: Monday, March 26, 2018 9:32 AM > > > To: dev@cassandra.apache.org > > > Subject: Re: question on running cassandra-dtests > > > > > > Hi, > > > > > > Your environment is python 2.7 when it should be python 3. > > > See: > > > > File "/usr/local/lib/python2.7/dist-packages/_pytest/assertion/ > > > > rewrite.py", line 213, in load_module > > > > > > Are you using virtualenv to create a python 3 environment to use with > > the tests? > > > > > > From README.md: > > > > > > **Note**: While virtualenv isn't strictly required, using virtualenv is > > > almost always the quickest path to success as it provides common base > > > setup across various configurations. > > > > > > 1. Install virtualenv: ``pip install virtualenv`` 2. Create a new > > > virtualenv: ``virtualenv --python=python3 --no-site-packages ~/dtest`` > > > 3. Switch/Activate the new virtualenv: ``source ~/dtest/bin/activate`` > > > 4. Install remaining DTest Python dependencies: ``pip install -r /path/ > > > to/cassandra-dtest/requirements.txt`` > > > > > > Regards, > > > Ariel > > > > > > On Mon, Mar 26, 2018, at 11:13 AM, Tyagi, Preetika wrote: > > > > I was able to run requirements.txt with success. Below is the error I > > get: > > > > > > > > Traceback (most recent call last): > > > > File "/usr/local/lib/python2.7/dist-packages/_pytest/config.py", > > > > line 371, in _importconftest > > > > mod = conftestpath.pyimport() > > > > File "/usr/local/lib/python2.7/dist-packages/py/_path/local.py", > > > > line 668, in pyimport > > > > __import__(modname) > > > > File "/usr/local/lib/python2.7/dist-packages/_pytest/assertion/ > > > > rewrite.py", line 213, in load_module > > > > py.builtin.exec_(co, mod.__dict__) > > > > File "/usr/local/lib/python2.7/dist-packages/py/_builtin.py", line > > > > 221, in exec_ > > > > exec2(obj, globals, locals) > > > > File "", line 7, in exec2 > > > > File "/home//conftest.py", line 11, in > > > > from itertools import zip_longest > > > > ImportError: cannot import name zip_longest > > > > ERRO
Re: question on running cassandra-dtests
On Tue, Mar 27, 2018 at 6:47 Ariel Weisberg <ar...@weisberg.ws> wrote: > Hi, > > Are you deleting the venv before creating it? You shouldn't really need to > use sudo for the virtualenv. That is going to make things potentially > wonky. Naming it cassandra-dtest might also do something wonky if you have > a cassandra-dtest directory already. I usually name it just venv and place > it in the same subdir as the requirements file. > > Also running sudo is going to create a new shell and then exit the shell > immediately so when you install the requirements it might be doing it not > in the venv, but in whatever is going on inside the sudo shell. Yep, looking at the logs, that's probably the issue. When activating a venv (with `source .../bin/activate`), it sets environment variables (`PATH`, `PYTHONHOME` etc.) so that the virtualenv's Python, pip are used instead of the system Python and pip. sudo defaults to using a clean PATH and resetting most of the user's environment, so the effects of the venv are lost when running in sudo. The advantage of virtualenv is not needing to mess with system packages at > all so sudo is inadvisable when creating, activating, and pip installing > things. > > You might need to use pip3 instead of pip, but I suspect that in a correct > venv pip is going to point to pip3. > > Ariel > > On Mon, Mar 26, 2018, at 5:31 PM, Tyagi, Preetika wrote: > > Yes, that's correct. I followed README and ran all below steps to create > > virtualenv. Attached is the output of all commands I ran successfully > > except the last one i.e. pytest. > > > > Could you please let me know if you see anything wrong or missing? > > > > Thanks, > > Preetika > > > > -Original Message- > > From: Ariel Weisberg [mailto:ar...@weisberg.ws] > > Sent: Monday, March 26, 2018 9:32 AM > > To: dev@cassandra.apache.org > > Subject: Re: question on running cassandra-dtests > > > > Hi, > > > > Your environment is python 2.7 when it should be python 3. > > See: > > > File "/usr/local/lib/python2.7/dist-packages/_pytest/assertion/ > > > rewrite.py", line 213, in load_module > > > > Are you using virtualenv to create a python 3 environment to use with > the tests? > > > > From README.md: > > > > **Note**: While virtualenv isn't strictly required, using virtualenv is > > almost always the quickest path to success as it provides common base > > setup across various configurations. > > > > 1. Install virtualenv: ``pip install virtualenv`` 2. Create a new > > virtualenv: ``virtualenv --python=python3 --no-site-packages ~/dtest`` > > 3. Switch/Activate the new virtualenv: ``source ~/dtest/bin/activate`` > > 4. Install remaining DTest Python dependencies: ``pip install -r /path/ > > to/cassandra-dtest/requirements.txt`` > > > > Regards, > > Ariel > > > > On Mon, Mar 26, 2018, at 11:13 AM, Tyagi, Preetika wrote: > > > I was able to run requirements.txt with success. Below is the error I > get: > > > > > > Traceback (most recent call last): > > > File "/usr/local/lib/python2.7/dist-packages/_pytest/config.py", > > > line 371, in _importconftest > > > mod = conftestpath.pyimport() > > > File "/usr/local/lib/python2.7/dist-packages/py/_path/local.py", > > > line 668, in pyimport > > > __import__(modname) > > > File "/usr/local/lib/python2.7/dist-packages/_pytest/assertion/ > > > rewrite.py", line 213, in load_module > > > py.builtin.exec_(co, mod.__dict__) > > > File "/usr/local/lib/python2.7/dist-packages/py/_builtin.py", line > > > 221, in exec_ > > > exec2(obj, globals, locals) > > > File "", line 7, in exec2 > > > File "/home//conftest.py", line 11, in > > > from itertools import zip_longest > > > ImportError: cannot import name zip_longest > > > ERROR: could not load /home//conftest.py > > > > > > Thanks, > > > Preetika > > > > > > -Original Message- > > > From: Murukesh Mohanan [mailto:murukesh.moha...@gmail.com] > > > Sent: Sunday, March 25, 2018 10:48 PM > > > To: dev@cassandra.apache.org > > > Subject: Re: question on running cassandra-dtests > > > > > > The complete error is needed. I get something similar if I hadn't run > > > `pip3 install -r requirements.txt`: > > > > > > Traceback (most recent call last): > > > File "/usr/local/lib/python3.6/site-packages/_pytest/c
RE: question on running cassandra-dtests
It seems like the test could not find configuration: ERROR: could not load /home/preetika/Preetika/OpenSource/DTests/cassandra-dtest/conftest.py I would probably re-check the setup and make sure the path for conftest.py is okay. Best, Chayapan Sent from my ASUS Original Message From:"Tyagi, Preetika" <preetika.ty...@intel.com> Sent:Tue, 27 Mar 2018 05:31:43 +0800 To:dev@cassandra.apache.org Subject:RE: question on running cassandra-dtests >Yes, that's correct. I followed README and ran all below steps to create >virtualenv. Attached is the output of all commands I ran successfully except >the last one i.e. pytest. > >Could you please let me know if you see anything wrong or missing? > >Thanks, >Preetika > >-Original Message- >From: Ariel Weisberg [mailto:ar...@weisberg.ws] >Sent: Monday, March 26, 2018 9:32 AM >To: dev@cassandra.apache.org >Subject: Re: question on running cassandra-dtests > >Hi, > >Your environment is python 2.7 when it should be python 3. >See: >> File "/usr/local/lib/python2.7/dist-packages/_pytest/assertion/ >> rewrite.py", line 213, in load_module > >Are you using virtualenv to create a python 3 environment to use with the >tests? > >From README.md: > >**Note**: While virtualenv isn't strictly required, using virtualenv is almost >always the quickest path to success as it provides common base setup across >various configurations. > >1. Install virtualenv: ``pip install virtualenv`` 2. Create a new virtualenv: >``virtualenv --python=python3 --no-site-packages ~/dtest`` 3. Switch/Activate >the new virtualenv: ``source ~/dtest/bin/activate`` 4. Install remaining DTest >Python dependencies: ``pip install -r >/path/to/cassandra-dtest/requirements.txt`` > >Regards, >Ariel > >On Mon, Mar 26, 2018, at 11:13 AM, Tyagi, Preetika wrote: >> I was able to run requirements.txt with success. Below is the error I get: >> >> Traceback (most recent call last): >> File "/usr/local/lib/python2.7/dist-packages/_pytest/config.py", >> line 371, in _importconftest >> mod = conftestpath.pyimport() >> File "/usr/local/lib/python2.7/dist-packages/py/_path/local.py", >> line 668, in pyimport >> __import__(modname) >> File "/usr/local/lib/python2.7/dist-packages/_pytest/assertion/ >> rewrite.py", line 213, in load_module >> py.builtin.exec_(co, mod.__dict__) >> File "/usr/local/lib/python2.7/dist-packages/py/_builtin.py", line >> 221, in exec_ >> exec2(obj, globals, locals) >> File "", line 7, in exec2 >> File "/home//conftest.py", line 11, in >> from itertools import zip_longest >> ImportError: cannot import name zip_longest >> ERROR: could not load /home//conftest.py >> >> Thanks, >> Preetika >> >> -Original Message- >> From: Murukesh Mohanan [mailto:murukesh.moha...@gmail.com] >> Sent: Sunday, March 25, 2018 10:48 PM >> To: dev@cassandra.apache.org >> Subject: Re: question on running cassandra-dtests >> >> The complete error is needed. I get something similar if I hadn't run >> `pip3 install -r requirements.txt`: >> >> Traceback (most recent call last): >> File "/usr/local/lib/python3.6/site-packages/_pytest/config.py", >> line 328, in _getconftestmodules >> return self._path2confmods[path] >> KeyError: local('/home/muru/dev/cassandra-dtest') >> >> During handling of the above exception, another exception occurred: >> Traceback (most recent call last): >> File "/usr/local/lib/python3.6/site-packages/_pytest/config.py", >> line 359, in _importconftest >> return self._conftestpath2mod[conftestpath] >> KeyError: local('/home/muru/dev/cassandra-dtest/conftest.py') >> >> During handling of the above exception, another exception occurred: >> Traceback (most recent call last): >> File "/usr/local/lib/python3.6/site-packages/_pytest/config.py", >> line 365, in _importconftest >> mod = conftestpath.pyimport() >> File "/usr/local/lib/python3.6/site-packages/py/_path/local.py", >> line 668, in pyimport >> __import__(modname) >> File "/usr/local/lib/python3.6/site-packages/_pytest/assertion/ >> rewrite.py", line 212, in load_module >> py.builtin.exec_(co, mod.__dict__) >> File "/home/muru/dev/cassandra-dtest/conftest.py", line 13, in >> >> from dtest import running_in_docker, >> cleanup_docker_environment_before_test_execution >> File "/hom
RE: question on running cassandra-dtests
Yes, that's correct. I followed README and ran all below steps to create virtualenv. Attached is the output of all commands I ran successfully except the last one i.e. pytest. Could you please let me know if you see anything wrong or missing? Thanks, Preetika -Original Message- From: Ariel Weisberg [mailto:ar...@weisberg.ws] Sent: Monday, March 26, 2018 9:32 AM To: dev@cassandra.apache.org Subject: Re: question on running cassandra-dtests Hi, Your environment is python 2.7 when it should be python 3. See: > File "/usr/local/lib/python2.7/dist-packages/_pytest/assertion/ > rewrite.py", line 213, in load_module Are you using virtualenv to create a python 3 environment to use with the tests? From README.md: **Note**: While virtualenv isn't strictly required, using virtualenv is almost always the quickest path to success as it provides common base setup across various configurations. 1. Install virtualenv: ``pip install virtualenv`` 2. Create a new virtualenv: ``virtualenv --python=python3 --no-site-packages ~/dtest`` 3. Switch/Activate the new virtualenv: ``source ~/dtest/bin/activate`` 4. Install remaining DTest Python dependencies: ``pip install -r /path/to/cassandra-dtest/requirements.txt`` Regards, Ariel On Mon, Mar 26, 2018, at 11:13 AM, Tyagi, Preetika wrote: > I was able to run requirements.txt with success. Below is the error I get: > > Traceback (most recent call last): > File "/usr/local/lib/python2.7/dist-packages/_pytest/config.py", > line 371, in _importconftest > mod = conftestpath.pyimport() > File "/usr/local/lib/python2.7/dist-packages/py/_path/local.py", > line 668, in pyimport > __import__(modname) > File "/usr/local/lib/python2.7/dist-packages/_pytest/assertion/ > rewrite.py", line 213, in load_module > py.builtin.exec_(co, mod.__dict__) > File "/usr/local/lib/python2.7/dist-packages/py/_builtin.py", line > 221, in exec_ > exec2(obj, globals, locals) > File "", line 7, in exec2 > File "/home//conftest.py", line 11, in > from itertools import zip_longest > ImportError: cannot import name zip_longest > ERROR: could not load /home//conftest.py > > Thanks, > Preetika > > -Original Message----- > From: Murukesh Mohanan [mailto:murukesh.moha...@gmail.com] > Sent: Sunday, March 25, 2018 10:48 PM > To: dev@cassandra.apache.org > Subject: Re: question on running cassandra-dtests > > The complete error is needed. I get something similar if I hadn't run > `pip3 install -r requirements.txt`: > > Traceback (most recent call last): > File "/usr/local/lib/python3.6/site-packages/_pytest/config.py", > line 328, in _getconftestmodules > return self._path2confmods[path] > KeyError: local('/home/muru/dev/cassandra-dtest') > > During handling of the above exception, another exception occurred: > Traceback (most recent call last): > File "/usr/local/lib/python3.6/site-packages/_pytest/config.py", > line 359, in _importconftest > return self._conftestpath2mod[conftestpath] > KeyError: local('/home/muru/dev/cassandra-dtest/conftest.py') > > During handling of the above exception, another exception occurred: > Traceback (most recent call last): > File "/usr/local/lib/python3.6/site-packages/_pytest/config.py", > line 365, in _importconftest > mod = conftestpath.pyimport() > File "/usr/local/lib/python3.6/site-packages/py/_path/local.py", > line 668, in pyimport > __import__(modname) > File "/usr/local/lib/python3.6/site-packages/_pytest/assertion/ > rewrite.py", line 212, in load_module > py.builtin.exec_(co, mod.__dict__) > File "/home/muru/dev/cassandra-dtest/conftest.py", line 13, in > > from dtest import running_in_docker, > cleanup_docker_environment_before_test_execution > File "/home/muru/dev/cassandra-dtest/dtest.py", line 12, in > import cassandra > ModuleNotFoundError: No module named 'cassandra' > ERROR: could not load /home/muru/dev/cassandra-dtest/conftest.py > > Of course, `pip3 install -r requirements.txt` creates an `src` > directory with appropriate branches of ccm and cassandra-driver checked out. > > If you have run `pip3 install -r requirements.txt`, then something > else is wrong and we need the complete error log. > > On 2018/03/23 20:22:47, "Tyagi, Preetika" <preetika.ty...@intel.com> wrote: > > Hi All, > > > > I am trying to setup and run Cassandra-dtests so that I can write some > > tests for a JIRA ticket I have been working on. > > This is the repo I am using: > > https://github.com/apache/cassandra-dtest > > I followed all the instru
Re: question on running cassandra-dtests
Hi, Your environment is python 2.7 when it should be python 3. See: > File "/usr/local/lib/python2.7/dist-packages/_pytest/assertion/ > rewrite.py", line 213, in load_module Are you using virtualenv to create a python 3 environment to use with the tests? >From README.md: **Note**: While virtualenv isn't strictly required, using virtualenv is almost always the quickest path to success as it provides common base setup across various configurations. 1. Install virtualenv: ``pip install virtualenv`` 2. Create a new virtualenv: ``virtualenv --python=python3 --no-site-packages ~/dtest`` 3. Switch/Activate the new virtualenv: ``source ~/dtest/bin/activate`` 4. Install remaining DTest Python dependencies: ``pip install -r /path/to/cassandra-dtest/requirements.txt`` Regards, Ariel On Mon, Mar 26, 2018, at 11:13 AM, Tyagi, Preetika wrote: > I was able to run requirements.txt with success. Below is the error I get: > > Traceback (most recent call last): > File "/usr/local/lib/python2.7/dist-packages/_pytest/config.py", line > 371, in _importconftest > mod = conftestpath.pyimport() > File "/usr/local/lib/python2.7/dist-packages/py/_path/local.py", line > 668, in pyimport > __import__(modname) > File "/usr/local/lib/python2.7/dist-packages/_pytest/assertion/ > rewrite.py", line 213, in load_module > py.builtin.exec_(co, mod.__dict__) > File "/usr/local/lib/python2.7/dist-packages/py/_builtin.py", line > 221, in exec_ > exec2(obj, globals, locals) > File "", line 7, in exec2 > File "/home//conftest.py", line 11, in > from itertools import zip_longest > ImportError: cannot import name zip_longest > ERROR: could not load /home//conftest.py > > Thanks, > Preetika > > -Original Message- > From: Murukesh Mohanan [mailto:murukesh.moha...@gmail.com] > Sent: Sunday, March 25, 2018 10:48 PM > To: dev@cassandra.apache.org > Subject: Re: question on running cassandra-dtests > > The complete error is needed. I get something similar if I hadn't run > `pip3 install -r requirements.txt`: > > Traceback (most recent call last): > File "/usr/local/lib/python3.6/site-packages/_pytest/config.py", line > 328, in _getconftestmodules > return self._path2confmods[path] > KeyError: local('/home/muru/dev/cassandra-dtest') > > During handling of the above exception, another exception occurred: > Traceback (most recent call last): > File "/usr/local/lib/python3.6/site-packages/_pytest/config.py", line > 359, in _importconftest > return self._conftestpath2mod[conftestpath] > KeyError: local('/home/muru/dev/cassandra-dtest/conftest.py') > > During handling of the above exception, another exception occurred: > Traceback (most recent call last): > File "/usr/local/lib/python3.6/site-packages/_pytest/config.py", line > 365, in _importconftest > mod = conftestpath.pyimport() > File "/usr/local/lib/python3.6/site-packages/py/_path/local.py", line > 668, in pyimport > __import__(modname) > File "/usr/local/lib/python3.6/site-packages/_pytest/assertion/ > rewrite.py", line 212, in load_module > py.builtin.exec_(co, mod.__dict__) > File "/home/muru/dev/cassandra-dtest/conftest.py", line 13, in > > from dtest import running_in_docker, > cleanup_docker_environment_before_test_execution > File "/home/muru/dev/cassandra-dtest/dtest.py", line 12, in > import cassandra > ModuleNotFoundError: No module named 'cassandra' > ERROR: could not load /home/muru/dev/cassandra-dtest/conftest.py > > Of course, `pip3 install -r requirements.txt` creates an `src` directory > with appropriate branches of ccm and cassandra-driver checked out. > > If you have run `pip3 install -r requirements.txt`, then something else > is wrong and we need the complete error log. > > On 2018/03/23 20:22:47, "Tyagi, Preetika" <preetika.ty...@intel.com> wrote: > > Hi All, > > > > I am trying to setup and run Cassandra-dtests so that I can write some > > tests for a JIRA ticket I have been working on. > > This is the repo I am using: https://github.com/apache/cassandra-dtest > > I followed all the instructions and installed dependencies. > > > > However, when I run "pytest -cassandra-dir= > directory> > > > > It throws the error "could not load /conftest.py. > > > > I checked that this file (conftest.py) exists in Cassandra-dtest source > > root and I'm not sure why it cannot find it. Does anyone have any idea what > > might be going wrong here? > > > > I haven't used dtests be
RE: question on running cassandra-dtests
I was able to run requirements.txt with success. Below is the error I get: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/_pytest/config.py", line 371, in _importconftest mod = conftestpath.pyimport() File "/usr/local/lib/python2.7/dist-packages/py/_path/local.py", line 668, in pyimport __import__(modname) File "/usr/local/lib/python2.7/dist-packages/_pytest/assertion/rewrite.py", line 213, in load_module py.builtin.exec_(co, mod.__dict__) File "/usr/local/lib/python2.7/dist-packages/py/_builtin.py", line 221, in exec_ exec2(obj, globals, locals) File "", line 7, in exec2 File "/home//conftest.py", line 11, in from itertools import zip_longest ImportError: cannot import name zip_longest ERROR: could not load /home//conftest.py Thanks, Preetika -Original Message- From: Murukesh Mohanan [mailto:murukesh.moha...@gmail.com] Sent: Sunday, March 25, 2018 10:48 PM To: dev@cassandra.apache.org Subject: Re: question on running cassandra-dtests The complete error is needed. I get something similar if I hadn't run `pip3 install -r requirements.txt`: Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/_pytest/config.py", line 328, in _getconftestmodules return self._path2confmods[path] KeyError: local('/home/muru/dev/cassandra-dtest') During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/_pytest/config.py", line 359, in _importconftest return self._conftestpath2mod[conftestpath] KeyError: local('/home/muru/dev/cassandra-dtest/conftest.py') During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/_pytest/config.py", line 365, in _importconftest mod = conftestpath.pyimport() File "/usr/local/lib/python3.6/site-packages/py/_path/local.py", line 668, in pyimport __import__(modname) File "/usr/local/lib/python3.6/site-packages/_pytest/assertion/rewrite.py", line 212, in load_module py.builtin.exec_(co, mod.__dict__) File "/home/muru/dev/cassandra-dtest/conftest.py", line 13, in from dtest import running_in_docker, cleanup_docker_environment_before_test_execution File "/home/muru/dev/cassandra-dtest/dtest.py", line 12, in import cassandra ModuleNotFoundError: No module named 'cassandra' ERROR: could not load /home/muru/dev/cassandra-dtest/conftest.py Of course, `pip3 install -r requirements.txt` creates an `src` directory with appropriate branches of ccm and cassandra-driver checked out. If you have run `pip3 install -r requirements.txt`, then something else is wrong and we need the complete error log. On 2018/03/23 20:22:47, "Tyagi, Preetika" <preetika.ty...@intel.com> wrote: > Hi All, > > I am trying to setup and run Cassandra-dtests so that I can write some tests > for a JIRA ticket I have been working on. > This is the repo I am using: https://github.com/apache/cassandra-dtest > I followed all the instructions and installed dependencies. > > However, when I run "pytest -cassandra-dir= directory> > > It throws the error "could not load /conftest.py. > > I checked that this file (conftest.py) exists in Cassandra-dtest source root > and I'm not sure why it cannot find it. Does anyone have any idea what might > be going wrong here? > > I haven't used dtests before so I wonder if I'm missing something here. > > Thanks, > Preetika > > - To unsubscribe, e-mail: dev-unsubscr...@cassandra.apache.org For additional commands, e-mail: dev-h...@cassandra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@cassandra.apache.org For additional commands, e-mail: dev-h...@cassandra.apache.org
Re: question on running cassandra-dtests
The complete error is needed. I get something similar if I hadn't run `pip3 install -r requirements.txt`: Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/_pytest/config.py", line 328, in _getconftestmodules return self._path2confmods[path] KeyError: local('/home/muru/dev/cassandra-dtest') During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/_pytest/config.py", line 359, in _importconftest return self._conftestpath2mod[conftestpath] KeyError: local('/home/muru/dev/cassandra-dtest/conftest.py') During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/_pytest/config.py", line 365, in _importconftest mod = conftestpath.pyimport() File "/usr/local/lib/python3.6/site-packages/py/_path/local.py", line 668, in pyimport __import__(modname) File "/usr/local/lib/python3.6/site-packages/_pytest/assertion/rewrite.py", line 212, in load_module py.builtin.exec_(co, mod.__dict__) File "/home/muru/dev/cassandra-dtest/conftest.py", line 13, in from dtest import running_in_docker, cleanup_docker_environment_before_test_execution File "/home/muru/dev/cassandra-dtest/dtest.py", line 12, in import cassandra ModuleNotFoundError: No module named 'cassandra' ERROR: could not load /home/muru/dev/cassandra-dtest/conftest.py Of course, `pip3 install -r requirements.txt` creates an `src` directory with appropriate branches of ccm and cassandra-driver checked out. If you have run `pip3 install -r requirements.txt`, then something else is wrong and we need the complete error log. On 2018/03/23 20:22:47, "Tyagi, Preetika"wrote: > Hi All, > > I am trying to setup and run Cassandra-dtests so that I can write some tests > for a JIRA ticket I have been working on. > This is the repo I am using: https://github.com/apache/cassandra-dtest > I followed all the instructions and installed dependencies. > > However, when I run "pytest -cassandra-dir= directory> > > It throws the error "could not load /conftest.py. > > I checked that this file (conftest.py) exists in Cassandra-dtest source root > and I'm not sure why it cannot find it. Does anyone have any idea what might > be going wrong here? > > I haven't used dtests before so I wonder if I'm missing something here. > > Thanks, > Preetika > > - To unsubscribe, e-mail: dev-unsubscr...@cassandra.apache.org For additional commands, e-mail: dev-h...@cassandra.apache.org
question on running cassandra-dtests
Hi All, I am trying to setup and run Cassandra-dtests so that I can write some tests for a JIRA ticket I have been working on. This is the repo I am using: https://github.com/apache/cassandra-dtest I followed all the instructions and installed dependencies. However, when I run "pytest -cassandra-dir= It throws the error "could not load /conftest.py. I checked that this file (conftest.py) exists in Cassandra-dtest source root and I'm not sure why it cannot find it. Does anyone have any idea what might be going wrong here? I haven't used dtests before so I wonder if I'm missing something here. Thanks, Preetika