-
Notifications
You must be signed in to change notification settings - Fork 696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Automated Failure Testing #2044
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2044 +/- ##
==========================================
+ Coverage 93.49% 94.04% +0.54%
==========================================
Files 100 100
Lines 26104 29201 +3097
==========================================
+ Hits 24407 27461 +3054
- Misses 1697 1740 +43 |
use IO::Socket; | ||
|
||
my $command = $_[0]; | ||
my $sockpath = '/home/brian/Work/citus/src/test/regress/gdb.sock'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you make this a relative path ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think eventually it'll need to be a hostname:port tuple, otherwise this won't work on Windows.
) SELECT citus.gdb_attach(pid.pid) FROM pid; | ||
|
||
SELECT citus.run_command('!break NeedsDistributedPlanning'); | ||
SELECT citus.run_command('continue'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API seems a bit messy at the moment. Would it make sense to do something like:
SELECT citus.gdb_init();
SELECT citus.gdb_break('NeedsDistributedPlanning');
SELECT citus.gdb_continue();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, 100%. This API isn't very user friendly. I haven't made it nicer yet for a couple reasons:
- I'm not sure what the right API is yet, I want to write some more tests before deciding what the right set of concepts is.
- These functions are a little hard to add and iterate on. I haven't figured out how to share code between the functions so I need to copy and paste the code for connecting to a socket and modify it in all of them whenever it changes. For now just having a
run_command
is easier to develop with.
- One of them uses iptables to isolate the node and kill all connections - Two of them terminate the relevant worker backend
c475f66
to
fd53545
Compare
For #2001
Done:
Some things we might want to add:
make check
fail if the tests reference function names which no longer exist.