Skip to content
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

Closed
wants to merge 11 commits into from
Closed

Conversation

lithp
Copy link
Contributor

@lithp lithp commented Mar 6, 2018

For #2001

Done:

  • Create a daemon which backgrounds gdb and allows us to send commands to it.

Some things we might want to add:

  • Have make check fail if the tests reference function names which no longer exist.

@lithp lithp self-assigned this Mar 6, 2018
@codecov
Copy link

codecov bot commented Mar 6, 2018

Codecov Report

Merging #2044 into master will increase coverage by 0.54%.
The diff coverage is n/a.

@@            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';
Copy link
Member

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 ?

Copy link
Contributor Author

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');
Copy link
Member

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();

Copy link
Contributor Author

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.

lithp added 2 commits March 14, 2018 18:57
- One of them uses iptables to isolate the node and kill all connections
- Two of them terminate the relevant worker backend
@lithp lithp force-pushed the automated-failure-testing branch from c475f66 to fd53545 Compare March 15, 2018 02:11
@lithp lithp closed this Apr 19, 2018
@serprex serprex deleted the automated-failure-testing branch August 22, 2019 20:59
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