Listen gem not forwarding events to guard - guard

I can't get Guard to run any action.
I'm using:
Gentoo x64 (3.14.14)
rbx-2.5.2
guard 2.11.1
listen 2.8.5
Guardfile is just catch-it-all from Understanding guard
guard :rspec, cmd: "bundle exec rspec" do
watch(/(.*)/) { |m| Guard::UI.puts "Unknown file: #{m[1]}"; nil }
end
And here is the output of $ LISTEN_GEM_DEBUGGING=2 bundle exec guard -d
I, [2015-02-04T08:11:34.995518 #25370] INFO -- : Celluloid loglevel set to: 0
I, [2015-02-04T08:11:34.997566 #25370] INFO -- : Listen version: 2.8.5
08:11:35 - DEBUG - Notiffany: gntp not available (Please add "gem 'ruby_gntp'" to your Gemfile and run your app with "bundle exec".).
08:11:35 - DEBUG - Notiffany: growl not available (Unsupported platform "linux-gnu").
08:11:35 - DEBUG - Notiffany: terminal_notifier not available (Unsupported platform "linux-gnu").
08:11:35 - DEBUG - Notiffany: libnotify not available (Please add "gem 'libnotify'" to your Gemfile and run your app with "bundle exec".).
08:11:35 - DEBUG - Notiffany: notifysend not available (Please add "gem 'notify_send'" to your Gemfile and run your app with "bundle exec".).
08:11:35 - DEBUG - Notiffany: notifu not available (Unsupported platform "linux-gnu").
08:11:35 - DEBUG - Command execution: emacsclient --eval '1'
08:11:35 - DEBUG - Notiffany: emacs not available (Emacs client failed).
08:11:35 - DEBUG - Notiffany: tmux not available (:tmux notifier is only available inside a TMux session.).
08:11:35 - DEBUG - Notiffany: file not available (No :path option given).
08:11:35 - DEBUG - Notiffany is using TerminalTitle to send notifications.
08:11:35 - DEBUG - Command execution: hash stty
08:11:35 - DEBUG - Guard starts all plugins
08:11:35 - DEBUG - Hook :start_begin executed for Guard::RSpec
08:11:35 - INFO - Guard::RSpec is running
08:11:35 - DEBUG - Hook :start_end executed for Guard::RSpec
D, [2015-02-04T08:11:35.245730 #25370] DEBUG -- : Adapter: considering TCP ...
D, [2015-02-04T08:11:35.245850 #25370] DEBUG -- : Adapter: considering polling ...
D, [2015-02-04T08:11:35.245900 #25370] DEBUG -- : Adapter: considering optimized backend...
I, [2015-02-04T08:11:35.286148 #25370] INFO -- : Record.build(): 0.03905487060546875 seconds
08:11:35 - INFO - Guard is now watching at '/media/I/08projects/programming/rails/tests/guard_test'
08:11:35 - DEBUG - Start interactor
[1] guard(main)> D, [2015-02-04T08:11:44.639225 #25370] DEBUG -- : inotify: app/controllers/users_controller.rb ([:attrib])
D, [2015-02-04T08:11:44.639598 #25370] DEBUG -- : raw queue: [:file, #<Pathname:/media/I/08projects/programming/rails/tests/guard_test>, "app/controllers/users_controller.rb", {:change=>:modified}]
D, [2015-02-04T08:11:44.640532 #25370] DEBUG -- : inotify: app/controllers/users_controller.rb ([:close, :close_write])
D, [2015-02-04T08:11:44.640733 #25370] DEBUG -- : raw queue: [:file, #<Pathname:/media/I/08projects/programming/rails/tests/guard_test>, "app/controllers/users_controller.rb", {:change=>:modified}]
As far as I can see, listen detects file change but for some reason won't forward it to guard

Related

How to trigger karate gatling distributed test?

We want to run karate gatling distributed mode to test API performance.
Here is the performance test class for master node
public class TestPerformanceDocker {
#Test
void test(){
//master node server ip
String serverUrl= "127.0.0.1";
String threads = System.getProperty("THREADS");
String rampDuration = System.getProperty("RAMP_DURATION");
String constantDuration =System.getProperty("CONST_DURATION");
//slave node amounts
Integer executorCount=Integer.parseInt(System.getProperty("NODES_COUNT"));
String cmd ="mvn gatling:test -DTHREADS="+threads+" -DRAMP_DURATION="+rampDuration+" -DCONST_DURATION="+constantDuration+"";
GatlingMavenJobConfig config = new GatlingMavenJobConfig(executorCount, serverUrl, 9090) {};
config.setMainCommand(cmd);
JobManager<Integer> manager = new JobManager(config);
manager.start();
manager.waitForCompletion();
}
}
Start the master node with cmd :
docker container run -d -t --network=karate_network --name karate_boss --privileged karate mvn clean test -Dtest=TestPerformanceDocker -DTHREADS=3 -DRAMP_DURATION=600 -DCONST_DURATION=600
Face with error log below:
2022-12-20 21:55:35 13:55:35.259 [main] DEBUG com.intuit.karate.http.HttpServer - server started: f224cb587867:9090
2022-12-20 21:55:35 13:55:35.261 [main] DEBUG com.intuit.karate.job.JobManager - added to queue: 1
2022-12-20 21:55:35 13:55:35.262 [main] DEBUG com.intuit.karate.job.JobManager - added to queue: 2
2022-12-20 21:55:35 13:55:35.265 [main] DEBUG com.intuit.karate.job.JobManager - added to queue: 3
2022-12-20 21:55:35 13:55:35.283 [1671544535281] DEBUG com.intuit.karate - command: [docker, run, --rm, --cap-add=SYS_ADMIN, -e, KARATE_JOBURL=http://127.0.0.1:9090, ptrthomas/karate-chrome], working dir: null
2022-12-20 21:55:35 13:55:35.285 [1671544535281] DEBUG com.intuit.karate - command: [docker, run, --rm, --cap-add=SYS_ADMIN, -e, KARATE_JOBURL=http://127.0.0.1:9090, ptrthomas/karate-chrome], working dir: null
2022-12-20 21:55:35 13:55:35.285 [1671544535281] DEBUG com.intuit.karate - command: [docker, run, --rm, --cap-add=SYS_ADMIN, -e, KARATE_JOBURL=http://127.0.0.1:9090, ptrthomas/karate-chrome], working dir: null
2022-12-20 21:55:35 13:55:35.348 [1671544535281-out] DEBUG com.intuit.karate - docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
2022-12-20 21:55:35 13:55:35.349 [1671544535281-out] DEBUG com.intuit.karate - See 'docker run --help'.
2022-12-20 21:55:35 13:55:35.357 [1671544535281] WARN com.intuit.karate.shell.Command - exit code was non-zero: 125 - [docker, run, --rm, --cap-add=SYS_ADMIN, -e, KARATE_JOBURL=http://127.0.0.1:9090, ptrthomas/karate-chrome] working dir: null
2022-12-20 21:55:35 13:55:35.363 [1671544535281-out] DEBUG com.intuit.karate - docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
2022-12-20 21:55:35 13:55:35.364 [1671544535281-out] DEBUG com.intuit.karate - See 'docker run --help'.
2022-12-20 21:55:35 13:55:35.365 [1671544535281-out] DEBUG com.intuit.karate - docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
2022-12-20 21:55:35 13:55:35.366 [1671544535281-out] DEBUG com.intuit.karate - See 'docker run --help'.
2022-12-20 21:55:35 13:55:35.369 [1671544535281] WARN com.intuit.karate.shell.Command - exit code was non-zero: 125 - [docker, run, --rm, --cap-add=SYS_ADMIN, -e, KARATE_JOBURL=http://127.0.0.1:9090, ptrthomas/karate-chrome] working dir: null
2022-12-20 21:55:35 13:55:35.371 [1671544535281] WARN com.intuit.karate.shell.Command - exit code was non-zero: 125 - [docker, run, --rm, --cap-add=SYS_ADMIN, -e, KARATE_JOBURL=http://127.0.0.1:9090, ptrthomas/karate-chrome] working dir: null
With the reference article in official github, we want to run the karate-gatling with distributed mode for API testing.
Reference assets:
https://github.com/karatelabs/karate/wiki/Distributed-Testing#jenkins-config

Nextflow: output not being "found", despite setting publishDir

I have the following nextflow script:
echo true
wd = "$params.wd"
geoid = "$params.geoid"
process step1 {
publishDir = "$wd/data/"
input:
val celFiles from "$wd/data/$geoid"
output:
file "${geoid}_datFiles.RData" into channel
"""
Rscript $wd/scripts/step1.R $celFiles $wd/data/${geoid}_datFiles.RData
"""
}
The Rscript contains the following commands:
step1=function(WD,
celFiles,
output) {
library(affy)
datFiles=ReadAffy(celfile.path=paste0(WD,"/",celFiles))
save(datFiles,file=output)
}
args=commandArgs(trailingOnly=TRUE)
WD=args[1]
celFiles=args[2]
output=args[3]
step1(WD,celFiles,output)
When it runs, the output file is saved in the directory I want ($wd/data/${geoid}_datFiles.RData). Given that publishDir points to the same directory, I would expect output (defined as "${geoid}_datFiles.RData") to be available under the publishDir directory.
However, I get the following error:
Missing output file(s) `GSE4290_datFiles.RData` expected by process `step1`
The log file suggests that nextflow is still looking for the output in the workflow created directory:
Process `step1` is unable to find [UnixPath]: `/Users/rebeccaeliscu/Desktop/workflow/affymetrix/nextflow/work/92/42afb131a36eb32ed780bd1bf3bc3b/GSE4290_datFiles.RData`
The complete log file:
Nov-12 17:55:39.611 [main] DEBUG nextflow.cli.Launcher - $> nextflow run main.nf
Nov-12 17:55:39.945 [main] INFO nextflow.cli.CmdRun - N E X T F L O W ~ version 20.07.1
Nov-12 17:55:39.968 [main] INFO nextflow.cli.CmdRun - Launching `main.nf` [infallible_brahmagupta] - revision: d68e496ea0
Nov-12 17:55:40.026 [main] DEBUG nextflow.config.ConfigBuilder - Found config local: /Users/rebeccaeliscu/Desktop/workflow/affymetrix/nextflow/nextflow.config
Nov-12 17:55:40.029 [main] DEBUG nextflow.config.ConfigBuilder - Parsing config file: /Users/rebeccaeliscu/Desktop/workflow/affymetrix/nextflow/nextflow.config
Nov-12 17:55:40.140 [main] DEBUG nextflow.config.ConfigBuilder - Applying config profile: `standard`
Nov-12 17:55:41.288 [main] DEBUG nextflow.Session - Session uuid: 94f22a74-2a63-4a87-9fb3-33cf925a5a74
Nov-12 17:55:41.288 [main] DEBUG nextflow.Session - Run name: infallible_brahmagupta
Nov-12 17:55:41.289 [main] DEBUG nextflow.Session - Executor pool size: 4
Nov-12 17:55:41.326 [main] DEBUG nextflow.cli.CmdRun -
Version: 20.07.1 build 5412
Created: 24-07-2020 15:18 UTC (08:18 PDT)
System: Mac OS X 10.15.7
Runtime: Groovy 2.5.11 on Java HotSpot(TM) 64-Bit Server VM 1.8.0_111-b14
Encoding: UTF-8 (UTF-8)
Process: 46458#Rebeccas-MacBook-Pro-6.local.ucsf.edu [10.49.41.197]
CPUs: 4 - Mem: 8 GB (708.4 MB) - Swap: 2 GB (927 MB)
Nov-12 17:55:41.353 [main] DEBUG nextflow.Session - Work-dir: /Users/rebeccaeliscu/Desktop/workflow/affymetrix/nextflow/work [Mac OS X]
Nov-12 17:55:41.354 [main] DEBUG nextflow.Session - Script base path does not exist or is not a directory: /Users/rebeccaeliscu/Desktop/workflow/affymetrix/nextflow/bin
Nov-12 17:55:41.594 [main] DEBUG nextflow.Session - Observer factory: TowerFactory
Nov-12 17:55:41.598 [main] DEBUG nextflow.Session - Observer factory: DefaultObserverFactory
Nov-12 17:55:41.911 [main] DEBUG nextflow.Session - Session start invoked
Nov-12 17:55:42.309 [main] DEBUG nextflow.script.ScriptRunner - > Launching execution
Nov-12 17:55:42.331 [main] DEBUG nextflow.Session - Workflow process names [dsl1]: step1
Nov-12 17:55:42.334 [main] WARN nextflow.script.BaseScript - The use of `echo` method has been deprecated
Nov-12 17:55:42.495 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Nov-12 17:55:42.496 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Nov-12 17:55:42.508 [main] DEBUG nextflow.executor.Executor - [warm up] executor > local
Nov-12 17:55:42.521 [main] DEBUG n.processor.LocalPollingMonitor - Creating local task monitor for executor 'local' > cpus=4; memory=8 GB; capacity=4; pollInterval=100ms; dumpInterval=5m
Your output declaration is looking for a file in the current workDir: "${geoid}_datFiles.RData", but your Rscript is writing to: $wd/data/${geoid}_datFiles.RData. If you change your command to:
Rscript $wd/scripts/step1.R $celFiles ${geoid}_datFiles.RData
Then Nextflow should be able to find the output file. The publishDir directive will then 'publish' it to the defined publishDir.

Wrong number of arguments when executing guard

I'm currently running the following Guardfile
guard 'cucumber' do
watch(%r{^features/.+\.feature$})
watch(%r{^features/support/.+$}) { 'features' }
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] }
end
After running
> bundle exec guard --debug
I receive the following output
13:59:55 - ERROR - Invalid Guardfile, original error is:
> [#] wrong number of arguments (2 for 1)
13:59:55 - ERROR - No guards found in Guardfile, please add at least one.
13:59:55 - DEBUG - Command execution: which notify-send
13:59:55 - DEBUG - Command execution: emacsclient --eval '1' 2> /dev/null || echo 'N/A'
13:59:55 - INFO - Guard is using TerminalTitle to send notifications.
13:59:55 - DEBUG - Command execution: hash stty
13:59:55 - DEBUG - Guard starts all plugins
13:59:55 - INFO - Guard is now watching at '/opt/app'
13:59:58 - DEBUG - Start interacto
I'm using Ruby 1.9.3p551, Rubygems is 2.6.2, guard 1.8.3, guard-cucumber 2.0.0.
Any suggestion of what could be the problem?
Upgrade to Guard 2.13.0 (Guard 1.8.3 is obsolete).
It might be because older Guard expects a symbol, and not a string, so this could work:
guard :cucumber do

PHPUnit + Selenium 2.35 = BadMethodCallException

My English is not so good. Sorry.
I have:
PHPUnit 3.7.24
Selenium 2.35.0
I am starting selenium server:
java -jar /usr/local/bin/selenium-server-standalone-2.35.0.jar
Output:
04.09.2013 13:51:15 org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
13:51:25.373 INFO - Java: Sun Microsystems Inc. 20.45-b01
13:51:25.374 INFO - OS: Linux 3.8.0-29-generic i386
13:51:25.388 INFO - v2.35.0, with Core v2.35.0. Built from revision c916b9d
13:51:25.542 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
13:51:25.543 INFO - Version Jetty/5.1.x
13:51:25.544 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
13:51:25.545 INFO - Started HttpContext[/selenium-server,/selenium-server]
13:51:25.546 INFO - Started HttpContext[/,/]
13:51:25.567 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler#dda25b
13:51:25.567 INFO - Started HttpContext[/wd,/wd]
13:51:25.571 INFO - Started SocketListener on 0.0.0.0:4444
13:51:25.577 INFO - Started org.openqa.jetty.jetty.Server#b61fd1
My simple test:
public function testTitle()
{
$this->url('/');
$this->assertEquals('My title.', $this->title());
}
Next, run phpunit test with command:
phpunit --debug functional/MainPageTest.php
Output:
PHPUnit 3.7.24 by Sebastian Bergmann.
Configuration read from /home/demyan112rv/www/boo/protected/tests/phpunit.xml
Starting test 'MainPageTest::testTitle'.
E
Time: 17.59 seconds, Memory: 2.75Mb
There was 1 error:
1) MainPageTest::testTitle
PHP Warning: include(PHPUnit_Extensions_Story_TestCase.php): failed to open stream: No such file or directory in /home/demyan112rv/www/yii/YiiBase.php on line 421
PHP Warning: include(): Failed opening 'PHPUnit_Extensions_Story_TestCase.php' for inclusion (include_path='.:/home/demyan112rv/www/boo/protected/helpers:/home/demyan112rv/www/boo/protected/widgets:/home/demyan112rv/www/boo/protected/extensions/mail:/home/demyan112rv/www/boo/protected/services:/home/demyan112rv/www/boo/protected/components:/home/demyan112rv/www/boo/protected/models:/usr/share/php:/usr/share/pear') in /home/demyan112rv/www/yii/YiiBase.php on line 421
BadMethodCallException: The command http://localhost:4444/wd/hub/session/url is not recognized by the server.
/home/demyan112rv/www/yii/test/CWeb2TestCase.php:60
/home/demyan112rv/www/boo/protected/tests/functional/MainPageTest.php:11
/home/demyan112rv/www/boo/protected/tests/functional/MainPageTest.php:11
FAILURES!
Tests: 1, Assertions: 0, Errors: 1.
And in this time in selenium server a have next output:
13:55:39.438 INFO - Executing: [new session: {browserName=firefox}] at URL: /session)
13:55:39.452 INFO - Creating a new session for Capabilities [{browserName=firefox}]
13:55:56.642 INFO - Done: /session
I have error "BadMethodCallException: The command http:/ /localhost:4444/wd/hub/session/url is not recognized by the server.". This bug fixed for 2.35 in this link , but i have 2.35 and i have this error.
How to fix this problem?
Solution (i don't may answer on my question, because my rating is less than 10.
$ whereis phpunit
phpunit: /usr/bin/phpunit /usr/bin/X11/phpunit /usr/local/bin/phpunit
I have 3 path to phphunit. I don't know, it's normal or no.
When i changed command from:
phpunit --debug functional/MainPageTest.php
to
/usr/bin/phpunit --debug functional/MainPageTest.php
it's working!!!
if you have setUp your browser launch method i.e
function setUp()
{
$this->setBrowser("*firefox");
$this->setBrowserUrl("http://www.google.com/");
}
your function should look like this
public function testTitle()
{
$this->open('/');
$this->assertEquals('My title.', $this->title());
}
I've changed $this -> url('/'); to $this -> open('/');
please try now.

heroku create fatal error unable to remap

On Windows 7 machine, using cygwin ruby 1.92, rails 3.1.3.
I run the heroku create and get the following error message:
heroku create
Creating growing-journey-1774... done, stack is bamboo-mri-1.9.2
http://growing-journey-1774.heroku.com/ | git#heroku.com:growing-journey-1774.git
1 [main] ruby 4292 C:\cygwin\usr\local\bin\ruby.exe: *** fatal error - unable to remap \\?\C:\cygwin\usr\local\lib\ruby\1.9.1\i386-cygwin\etc.so to same address as parent: 0x3E0000 != 0x3F0000
Stack trace:
Frame Function Args
0028A778 6102796B (0028A778, 00000000, 00000000, 00000000)
0028AA68 6102796B (6117EC60, 00008000, 00000000, 61180977)
0028BA98 61004F1B (611A7FAC, 61248A3C, 003E0000, 003F0000)
End of stack trace
1 [main] ruby 2856 fork: child 4292 - died waiting for dll loading, errno 11
1086458 [main] ruby 2944 C:\cygwin\usr\local\bin\ruby.exe: *** fatal error - unable to remap \\?\C:\cygwin\usr\local\lib\ruby\1.9.1\i386-cygwin\etc.so to same address as parent: 0x3E0000 != 0x410000
Stack trace:
Frame Function Args
0028A778 6102796B (0028A778, 00000000, 00000000, 00000000)
0028AA68 6102796B (6117EC60, 00008000, 00000000, 61180977)
0028BA98 61004F1B (611A7FAC, 61248A3C, 003E0000, 00410000)
End of stack trace
1098573 [main] ruby 2856 fork: child 2944 - died waiting for dll loading, errno 11
I was able to upload the SSH keys to heroku just fine in the previous step.
Any ideas? My research hasn't led me anywhere. Appreciate anybody's help!
My Gem env shows:
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.12
- RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [i386-cygwin]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /usr/local/bin/ruby.exe
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-cygwin
- GEM PATHS:
- /usr/local/lib/ruby/gems/1.9.1
- /home/Philip/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
Your problem looks like more with Ruby or Cygwin setup and less with Heroku, try following link solution
http://redmine.jamoma.org/projects/jamoma/wiki/Setting_up_development_environment_in_Windows